From 8c1f7476340573aa836255e4bf427d7c22fec7a1 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 9 Jul 2025 20:49:31 +0200 Subject: [PATCH] build: fix node_use_sqlite for GN builds --- node.gni | 3 +++ unofficial.gni | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/node.gni b/node.gni index b049f0692980c3..d4438f7fd61598 100644 --- a/node.gni +++ b/node.gni @@ -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 = "" diff --git a/unofficial.gni b/unofficial.gni index a6c2f8c39becd2..c742b62c484e9d 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -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",