Commit 953ab4a
committed
bazel/sqlite3: add shared-lib wrapper for mattn/go-sqlite3 consumers
Introduce the building blocks required to redirect github.com/mattn/go-sqlite3
to the agent's own libsqlite3, without yet enabling the migration:
- deps/sqlite3.BUILD.bazel: cherry-pick the feature defines that the binding
applies in its bundled-amalgamation build (sqlite3.go:13-23) so the shared
libsqlite3 is feature-equivalent. Add :libsqlite3_headers, :_libsqlite3_shared
(cc_import of the cc_shared_library output), and :libsqlite3_dynamic, the
cdeps-consumable wrapper. Pattern mirrors //rtloader:rtloader_dynamic.
- bazel/rules/go_sqlite3/go_sqlite3_library.bzl: a go_library wrapper that
enables cgo and injects @sqlite3//:libsqlite3_dynamic as a cdep, plus a
TODO for the install-time rpath fix-up that will be needed once the agent
binary is built with Bazel.
- bazel/rules/go_sqlite3/BUILD.bazel: alias forwarding to
@sqlite3//:libsqlite3_dynamic. @sqlite3 isn't visible from the bzlmod
context of the gazelle-generated go-sqlite3 repo; the @@//... label
resolves regardless and insulates the macro from canonical-name churn.
No behavior change yet: these targets are inert until the gazelle override
that emits go_sqlite3_library lands in a follow-up commit.1 parent 44abfbe commit 953ab4a
3 files changed
Lines changed: 66 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| |||
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
| |||
0 commit comments