Skip to content

Commit 21eac79

Browse files
authored
build: fix node_use_sqlite for GN builds
PR-URL: #59017 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
1 parent f3adc11 commit 21eac79

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

node.gni

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ declare_args() {
4242
# The variable is called "openssl" for parity with node's GYP build.
4343
node_use_openssl = true
4444

45+
# Build node with SQLite support.
46+
node_use_sqlite = true
47+
4548
# Use the specified path to system CA (PEM format) in addition to
4649
# the BoringSSL supplied CA store or compiled-in Mozilla CA copy.
4750
node_openssl_system_ca_path = ""

unofficial.gni

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ template("node_gn_build") {
2222
} else {
2323
defines += [ "HAVE_OPENSSL=0" ]
2424
}
25+
if (node_use_sqlite) {
26+
defines += [ "HAVE_SQLITE=1" ]
27+
} else {
28+
defines += [ "HAVE_SQLITE=0" ]
29+
}
2530
if (node_use_amaro) {
2631
defines += [ "HAVE_AMARO=1" ]
2732
} else {
@@ -159,7 +164,6 @@ template("node_gn_build") {
159164
"deps/nghttp2",
160165
"deps/ngtcp2",
161166
"deps/postject",
162-
"deps/sqlite",
163167
"deps/uvwasi",
164168
"deps/zstd",
165169
"//third_party/zlib",
@@ -193,6 +197,10 @@ template("node_gn_build") {
193197
public_deps += [ "$node_openssl_path" ]
194198
sources += gypi_values.node_crypto_sources
195199
}
200+
if (node_use_sqlite) {
201+
deps += [ "deps/sqlite" ]
202+
sources += gypi_values.node_sqlite_sources
203+
}
196204
if (node_enable_inspector) {
197205
deps += [
198206
"$node_inspector_protocol_path:crdtp",

0 commit comments

Comments
 (0)