build: fix node_use_sqlite for GN builds

PR-URL: https://github.com/nodejs/node/pull/59017
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
This commit is contained in:
Shelley Vohr 2025-08-09 02:22:24 +02:00 committed by RafaelGSS
parent c6911f0717
commit 6a3bf772d8
No known key found for this signature in database
GPG key ID: 8BEAB4DFCF555EF4
2 changed files with 12 additions and 1 deletions

View file

@ -42,6 +42,9 @@ declare_args() {
# The variable is called "openssl" for parity with node's GYP build.
node_use_openssl = true
# Build node with SQLite support.
node_use_sqlite = true
# Use the specified path to system CA (PEM format) in addition to
# the BoringSSL supplied CA store or compiled-in Mozilla CA copy.
node_openssl_system_ca_path = ""

View file

@ -22,6 +22,11 @@ template("node_gn_build") {
} else {
defines += [ "HAVE_OPENSSL=0" ]
}
if (node_use_sqlite) {
defines += [ "HAVE_SQLITE=1" ]
} else {
defines += [ "HAVE_SQLITE=0" ]
}
if (node_use_amaro) {
defines += [ "HAVE_AMARO=1" ]
} else {
@ -159,7 +164,6 @@ template("node_gn_build") {
"deps/nghttp2",
"deps/ngtcp2",
"deps/postject",
"deps/sqlite",
"deps/uvwasi",
"deps/zstd",
"//third_party/zlib",
@ -193,6 +197,10 @@ template("node_gn_build") {
public_deps += [ "$node_openssl_path" ]
sources += gypi_values.node_crypto_sources
}
if (node_use_sqlite) {
deps += [ "deps/sqlite" ]
sources += gypi_values.node_sqlite_sources
}
if (node_enable_inspector) {
deps += [
"$node_inspector_protocol_path:crdtp",