diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni index 91001fa43ea4..0c6a7bd8c450 100644 --- a/deps/brotli/unofficial.gni +++ b/deps/brotli/unofficial.gni @@ -4,36 +4,49 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. -template("brotli_gn_build") { - config("brotli_config") { - include_dirs = [ "c/include" ] - } +import("../../node.gni") - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("brotli.gyp") ], - "scope", - [ "brotli.gyp" ]) - - source_set(target_name) { - forward_variables_from(invoker, "*") - public_configs = [ ":brotli_config" ] - sources = gypi_values.brotli_sources - if (is_linux) { - defines = [ "OS_LINUX" ] - } else if (is_mac) { - defines = [ "OS_MACOSX" ] - } else if (target_os == "freebsd") { - defines = [ "OS_FREEBSD" ] +template("brotli_gn_build") { + if (node_shared_brotli) { + import("//build/config/linux/pkg_config.gni") + pkg_config("brotli_config") { + packages = [ "libbrotlidec", "libbrotlienc" ] } - if (is_linux) { - libs = [ "m" ] + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":brotli_config" ] } - if (is_clang || !is_win) { - cflags_c = [ - "-Wno-implicit-fallthrough", - "-Wno-unreachable-code", - "-Wno-unreachable-code-return", - ] + } else { + config("brotli_config") { + include_dirs = [ "c/include" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("brotli.gyp") ], + "scope", + [ "brotli.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":brotli_config" ] + sources = gypi_values.brotli_sources + if (is_linux) { + defines = [ "OS_LINUX" ] + } else if (is_mac) { + defines = [ "OS_MACOSX" ] + } else if (target_os == "freebsd") { + defines = [ "OS_FREEBSD" ] + } + if (is_linux) { + libs = [ "m" ] + } + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code", + "-Wno-unreachable-code-return", + ] + } } } } diff --git a/deps/cares/unofficial.gni b/deps/cares/unofficial.gni index e02d7f425194..364df1f312e2 100644 --- a/deps/cares/unofficial.gni +++ b/deps/cares/unofficial.gni @@ -4,78 +4,91 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. -template("cares_gn_build") { - config("cares_config") { - include_dirs = [ "include" ] - if (!is_component_build) { - defines = [ "CARES_STATICLIB" ] - } - } - - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("cares.gyp") ], - "scope", - [ "cares.gyp" ]) +import("../../node.gni") - component(target_name) { - forward_variables_from(invoker, "*") - public_configs = [ ":cares_config" ] - if (is_component_build) { - defines = [ "CARES_BUILDING_LIBRARY" ] - } else { - defines = [] +template("cares_gn_build") { + if (node_shared_cares) { + import("//build/config/linux/pkg_config.gni") + pkg_config("cares_config") { + packages = [ "libcares" ] } - if (is_win) { - defines += [ "CARES_PULL_WS2TCPIP_H=1" ] + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":cares_config" ] } - if (is_posix) { - defines += [ - "_DARWIN_USE_64_BIT_INODE=1", - "_LARGEFILE_SOURCE", - "_FILE_OFFSET_BITS=64", - "_GNU_SOURCE", - "HAVE_CONFIG_H", - ] + } else { + config("cares_config") { + include_dirs = [ "include" ] + if (!is_component_build) { + defines = [ "CARES_STATICLIB" ] + } } - include_dirs = [ - "src/lib", - "src/lib/include", - ] - if (is_win) { - include_dirs += [ "config/win32" ] - } else if (is_linux) { - include_dirs += [ "config/linux" ] - } else if (is_mac) { - include_dirs += [ "config/darwin" ] - } + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("cares.gyp") ], + "scope", + [ "cares.gyp" ]) - if (is_win) { - libs = [ - "ws2_32.lib", - "iphlpapi.lib", - ] - } + component(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":cares_config" ] + if (is_component_build) { + defines = [ "CARES_BUILDING_LIBRARY" ] + } else { + defines = [] + } + if (is_win) { + defines += [ "CARES_PULL_WS2TCPIP_H=1" ] + } + if (is_posix) { + defines += [ + "_DARWIN_USE_64_BIT_INODE=1", + "_LARGEFILE_SOURCE", + "_FILE_OFFSET_BITS=64", + "_GNU_SOURCE", + "HAVE_CONFIG_H", + ] + } - sources = gypi_values.cares_sources_common - if (is_linux) { - sources += [ "config/linux/ares_config.h" ] - } - if (is_mac) { - sources += gypi_values.cares_sources_mac - } + include_dirs = [ + "src/lib", + "src/lib/include", + ] + if (is_win) { + include_dirs += [ "config/win32" ] + } else if (is_linux) { + include_dirs += [ "config/linux" ] + } else if (is_mac) { + include_dirs += [ "config/darwin" ] + } - if (is_clang) { if (is_win) { - cflags_c = [ - "-Wno-macro-redefined", - ] - } else { - cflags_c = [ - "-Wno-implicit-fallthrough", - "-Wno-unreachable-code", + libs = [ + "ws2_32.lib", + "iphlpapi.lib", ] } + + sources = gypi_values.cares_sources_common + if (is_linux) { + sources += [ "config/linux/ares_config.h" ] + } + if (is_mac) { + sources += gypi_values.cares_sources_mac + } + + if (is_clang) { + if (is_win) { + cflags_c = [ + "-Wno-macro-redefined", + ] + } else { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code", + ] + } + } } } } diff --git a/deps/histogram/unofficial.gni b/deps/histogram/unofficial.gni index 1173ab298ae7..fd8c3a276bcb 100644 --- a/deps/histogram/unofficial.gni +++ b/deps/histogram/unofficial.gni @@ -4,29 +4,42 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. +import("../../node.gni") + template("histogram_gn_build") { - config("histogram_config") { - include_dirs = [ "include" ] - } + if (node_shared_hdr_histogram) { + import("//build/config/linux/pkg_config.gni") + pkg_config("histogram_config") { + packages = [ "hdr_histogram" ] + } + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":histogram_config" ] + } + } else { + config("histogram_config") { + include_dirs = [ "include" ] + } - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("histogram.gyp") ], - "scope", - [ "histogram.gyp" ]) + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("histogram.gyp") ], + "scope", + [ "histogram.gyp" ]) - source_set(target_name) { - forward_variables_from(invoker, "*") - public_configs = [ ":histogram_config" ] - sources = gypi_values.histogram_sources - if (is_clang || !is_win) { - cflags_c = [ - "-Wno-atomic-alignment", - "-Wno-incompatible-pointer-types", - "-Wno-unused-function", - ] - } - if (is_linux) { - libs = [ "atomic" ] + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":histogram_config" ] + sources = gypi_values.histogram_sources + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-atomic-alignment", + "-Wno-incompatible-pointer-types", + "-Wno-unused-function", + ] + } + if (is_linux) { + libs = [ "atomic" ] + } } } } diff --git a/deps/llhttp/unofficial.gni b/deps/llhttp/unofficial.gni index fdce32e59764..28257dcb33ae 100644 --- a/deps/llhttp/unofficial.gni +++ b/deps/llhttp/unofficial.gni @@ -4,26 +4,39 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. +import("../../node.gni") + template("llhttp_gn_build") { - config("llhttp_config") { - include_dirs = [ "include" ] - } + if (node_shared_http_parser) { + import("//build/config/linux/pkg_config.gni") + pkg_config("llhttp_config") { + packages = [ "libllhttp" ] + } + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":llhttp_config" ] + } + } else { + config("llhttp_config") { + include_dirs = [ "include" ] + } - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("llhttp.gyp") ], - "scope", - [ "llhttp.gyp" ]) + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("llhttp.gyp") ], + "scope", + [ "llhttp.gyp" ]) - source_set(target_name) { - forward_variables_from(invoker, "*") - public_configs = [ ":llhttp_config" ] - include_dirs = [ "include" ] - sources = gypi_values.llhttp_sources - if (is_clang || !is_win) { - cflags_c = [ - "-Wno-implicit-fallthrough", - "-Wno-unreachable-code", - ] + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":llhttp_config" ] + include_dirs = [ "include" ] + sources = gypi_values.llhttp_sources + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code", + ] + } } } } diff --git a/deps/nghttp2/unofficial.gni b/deps/nghttp2/unofficial.gni index 4558fbbf5e5f..d37754f59124 100644 --- a/deps/nghttp2/unofficial.gni +++ b/deps/nghttp2/unofficial.gni @@ -4,40 +4,53 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. +import("../../node.gni") + template("nghttp2_gn_build") { - config("nghttp2_config") { - include_dirs = [ "lib/includes" ] - if (!is_component_build) { - defines = [ "NGHTTP2_STATICLIB" ] + if (node_shared_nghttp2) { + import("//build/config/linux/pkg_config.gni") + pkg_config("nghttp2_config") { + packages = [ "libnghttp2" ] + } + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":nghttp2_config" ] + } + } else { + config("nghttp2_config") { + include_dirs = [ "lib/includes" ] + if (!is_component_build) { + defines = [ "NGHTTP2_STATICLIB" ] + } } - } - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("nghttp2.gyp") ], - "scope", - [ "nghttp2.gyp" ]) + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("nghttp2.gyp") ], + "scope", + [ "nghttp2.gyp" ]) - component(target_name) { - forward_variables_from(invoker, "*") + component(target_name) { + forward_variables_from(invoker, "*") - public_configs = [ ":nghttp2_config" ] - defines = [ - "_U_", - "HAVE_CONFIG_H" - ] - if (is_component_build) { - defines += [ "BUILDING_NGHTTP2" ] - } + public_configs = [ ":nghttp2_config" ] + defines = [ + "_U_", + "HAVE_CONFIG_H" + ] + if (is_component_build) { + defines += [ "BUILDING_NGHTTP2" ] + } - sources = gypi_values.nghttp2_sources + sources = gypi_values.nghttp2_sources - if (is_clang || !is_win) { - cflags_c = [ - "-Wno-implicit-fallthrough", - # Ref https://github.com/nghttp2/nghttp2/pull/2258 - # This can be removed when the above PR is ingested. - "-Wno-extra-semi", - ] + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + # Ref https://github.com/nghttp2/nghttp2/pull/2258 + # This can be removed when the above PR is ingested. + "-Wno-extra-semi", + ] + } } } } diff --git a/deps/sqlite/unofficial.gni b/deps/sqlite/unofficial.gni index 0e62accfb699..a0957c5769d6 100644 --- a/deps/sqlite/unofficial.gni +++ b/deps/sqlite/unofficial.gni @@ -4,47 +4,67 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. +import("../../node.gni") + template("sqlite_gn_build") { - config("sqlite_config") { - include_dirs = [ "." ] - defines = [ - "SQLITE_ENABLE_COLUMN_METADATA", - "SQLITE_ENABLE_DBSTAT_VTAB", - "SQLITE_ENABLE_FTS3", - "SQLITE_ENABLE_FTS3_PARENTHESIS", - "SQLITE_ENABLE_FTS5", - "SQLITE_ENABLE_GEOPOLY", - "SQLITE_ENABLE_MATH_FUNCTIONS", - "SQLITE_ENABLE_PERCENTILE", - "SQLITE_ENABLE_PREUPDATE_HOOK", - "SQLITE_ENABLE_RBU", - "SQLITE_ENABLE_RTREE", - "SQLITE_ENABLE_SESSION", - ] - } + if (node_shared_sqlite) { + import("//build/config/linux/pkg_config.gni") + pkg_config("sqlite_config") { + packages = [ "sqlite3" ] + } + # sqlite3.h only declares the session extension when this is defined. + config("sqlite_defines") { + defines = [ "SQLITE_ENABLE_SESSION" ] + } + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ + ":sqlite_config", + ":sqlite_defines", + ] + } + } else { + config("sqlite_config") { + include_dirs = [ "." ] + defines = [ + "SQLITE_ENABLE_COLUMN_METADATA", + "SQLITE_ENABLE_DBSTAT_VTAB", + "SQLITE_ENABLE_FTS3", + "SQLITE_ENABLE_FTS3_PARENTHESIS", + "SQLITE_ENABLE_FTS5", + "SQLITE_ENABLE_GEOPOLY", + "SQLITE_ENABLE_MATH_FUNCTIONS", + "SQLITE_ENABLE_PERCENTILE", + "SQLITE_ENABLE_PREUPDATE_HOOK", + "SQLITE_ENABLE_RBU", + "SQLITE_ENABLE_RTREE", + "SQLITE_ENABLE_SESSION", + ] + } - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("sqlite.gyp") ], - "scope", - [ "sqlite.gyp" ]) + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("sqlite.gyp") ], + "scope", + [ "sqlite.gyp" ]) - source_set(target_name) { - forward_variables_from(invoker, "*") - public_configs = [ ":sqlite_config" ] - sources = gypi_values.sqlite_sources - cflags_c = [ - "-Wno-implicit-fallthrough", - "-Wno-unreachable-code-return", - "-Wno-unreachable-code-break", - "-Wno-unreachable-code", - ] - if (is_win) { - cflags_c += [ - "-Wno-sign-compare", - "-Wno-unused-but-set-variable", - "-Wno-unused-function", - "-Wno-unused-variable", + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":sqlite_config" ] + sources = gypi_values.sqlite_sources + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code-return", + "-Wno-unreachable-code-break", + "-Wno-unreachable-code", ] + if (is_win) { + cflags_c += [ + "-Wno-sign-compare", + "-Wno-unused-but-set-variable", + "-Wno-unused-function", + "-Wno-unused-variable", + ] + } } } } diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni index 0944d6ddd241..a2891887839b 100644 --- a/deps/uv/unofficial.gni +++ b/deps/uv/unofficial.gni @@ -4,113 +4,126 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. -template("uv_gn_build") { - config("uv_external_config") { - include_dirs = [ "include" ] - if (is_clang || !is_win) { - cflags_cc = [ - "-Wno-deprecated-pragma", # for using ENODATA in errno.h - ] - } - } - - config("uv_internal_config") { - include_dirs = [ - "include", - "src", - ] +import("../../node.gni") - defines = [ "BUILDING_UV_SHARED" ] # always export symbols - if (is_posix) { - defines += [ - "_LARGEFILE_SOURCE", - "_FILE_OFFSET_BITS=64", - ] +template("uv_gn_build") { + if (node_shared_libuv) { + import("//build/config/linux/pkg_config.gni") + pkg_config("uv_external_config") { + packages = [ "libuv" ] } - if (is_linux) { - defines += [ - "_POSIX_C_SOURCE=200112", - "_GNU_SOURCE", - ] + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":uv_external_config" ] } - if (is_apple) { - defines += [ - "_DARWIN_USE_64_BIT_INODE=1", - "_DARWIN_UNLIMITED_SELECT=1", - ] + } else { + config("uv_external_config") { + include_dirs = [ "include" ] + if (is_clang || !is_win) { + cflags_cc = [ + "-Wno-deprecated-pragma", # for using ENODATA in errno.h + ] + } } - if (is_clang || !is_win) { - cflags_c = [ - "-Wno-deprecated-declarations", - "-Wno-extra-semi", - "-Wno-implicit-fallthrough", - "-Wno-missing-braces", - "-Wno-sign-compare", - "-Wno-string-conversion", - "-Wno-shadow", - "-Wno-unreachable-code", - "-Wno-unreachable-code-return", - "-Wno-unused-but-set-parameter", - "-Wno-unused-but-set-variable", - "-Wno-unused-function", - "-Wno-unused-result", - "-Wno-unused-variable", + + config("uv_internal_config") { + include_dirs = [ + "include", + "src", ] + + defines = [ "BUILDING_UV_SHARED" ] # always export symbols + if (is_posix) { + defines += [ + "_LARGEFILE_SOURCE", + "_FILE_OFFSET_BITS=64", + ] + } + if (is_linux) { + defines += [ + "_POSIX_C_SOURCE=200112", + "_GNU_SOURCE", + ] + } + if (is_apple) { + defines += [ + "_DARWIN_USE_64_BIT_INODE=1", + "_DARWIN_UNLIMITED_SELECT=1", + ] + } + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-deprecated-declarations", + "-Wno-extra-semi", + "-Wno-implicit-fallthrough", + "-Wno-missing-braces", + "-Wno-sign-compare", + "-Wno-string-conversion", + "-Wno-shadow", + "-Wno-unreachable-code", + "-Wno-unreachable-code-return", + "-Wno-unused-but-set-parameter", + "-Wno-unused-but-set-variable", + "-Wno-unused-function", + "-Wno-unused-result", + "-Wno-unused-variable", + ] + } } - } - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("uv.gyp") ], - "scope", - [ "uv.gyp" ]) + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("uv.gyp") ], + "scope", + [ "uv.gyp" ]) - component(target_name) { - forward_variables_from(invoker, "*") + component(target_name) { + forward_variables_from(invoker, "*") - configs += [ ":uv_internal_config" ] - public_configs = [ ":uv_external_config" ] + configs += [ ":uv_internal_config" ] + public_configs = [ ":uv_external_config" ] - if (is_posix) { - configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] - configs += [ "//build/config/gcc:symbol_visibility_default" ] - } + if (is_posix) { + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] + configs += [ "//build/config/gcc:symbol_visibility_default" ] + } - if (is_win) { - libs = [ - "advapi32.lib", - "iphlpapi.lib", - "psapi.lib", - "shell32.lib", - "user32.lib", - "userenv.lib", - "ws2_32.lib", - ] - } - if (is_posix) { - ldflags = [ "-pthread" ] - } - if (is_linux) { - libs = [ - "m", - "dl", - "rt", - ] - } + if (is_win) { + libs = [ + "advapi32.lib", + "iphlpapi.lib", + "psapi.lib", + "shell32.lib", + "user32.lib", + "userenv.lib", + "ws2_32.lib", + ] + } + if (is_posix) { + ldflags = [ "-pthread" ] + } + if (is_linux) { + libs = [ + "m", + "dl", + "rt", + ] + } - sources = gypi_values.uv_sources_common - if (is_win) { - sources += gypi_values.uv_sources_win - } - if (is_posix) { - sources += gypi_values.uv_sources_posix + - [ "src/unix/proctitle.c" ] - } - if (is_linux) { - sources += gypi_values.uv_sources_linux - } - if (is_apple) { - sources += gypi_values.uv_sources_apple + - gypi_values.uv_sources_bsd_common + sources = gypi_values.uv_sources_common + if (is_win) { + sources += gypi_values.uv_sources_win + } + if (is_posix) { + sources += gypi_values.uv_sources_posix + + [ "src/unix/proctitle.c" ] + } + if (is_linux) { + sources += gypi_values.uv_sources_linux + } + if (is_apple) { + sources += gypi_values.uv_sources_apple + + gypi_values.uv_sources_bsd_common + } } } } diff --git a/deps/zstd/unofficial.gni b/deps/zstd/unofficial.gni index fe6c2b425eac..733ddb965684 100644 --- a/deps/zstd/unofficial.gni +++ b/deps/zstd/unofficial.gni @@ -4,25 +4,38 @@ # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. +import("../../node.gni") + template("zstd_gn_build") { - config("zstd_config") { - include_dirs = [ "./lib" ] - } + if (node_shared_zstd) { + import("//build/config/linux/pkg_config.gni") + pkg_config("zstd_config") { + packages = [ "libzstd" ] + } + group(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":zstd_config" ] + } + } else { + config("zstd_config") { + include_dirs = [ "./lib" ] + } - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("zstd.gyp") ], - "scope", - [ "zstd.gyp" ]) + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("zstd.gyp") ], + "scope", + [ "zstd.gyp" ]) - source_set(target_name) { - forward_variables_from(invoker, "*") - public_configs = [ ":zstd_config" ] - sources = gypi_values.zstd_sources - defines = [ "XXH_NAMESPACE=ZSTD_", "ZSTD_MULTITHREAD", "ZSTD_DISABLE_ASM" ] - cflags_c = [ "-Wno-unused-function" ] + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":zstd_config" ] + sources = gypi_values.zstd_sources + defines = [ "XXH_NAMESPACE=ZSTD_", "ZSTD_MULTITHREAD", "ZSTD_DISABLE_ASM" ] + cflags_c = [ "-Wno-unused-function" ] - if (is_posix) { - ldflags = [ "-pthread" ] + if (is_posix) { + ldflags = [ "-pthread" ] + } } } } diff --git a/node.gni b/node.gni index 21c8de1b2afb..fa4668a543e2 100644 --- a/node.gni +++ b/node.gni @@ -82,5 +82,19 @@ declare_args() { node_use_amaro = true } +# Link against shared copies of the bundled dependencies instead of building +# them, like configure's --shared-* options. The libraries are looked up with +# pkg-config, so these are meant for Linux distribution builds. +declare_args() { + node_shared_brotli = false + node_shared_cares = false + node_shared_hdr_histogram = false + node_shared_http_parser = false + node_shared_libuv = false + node_shared_nghttp2 = false + node_shared_sqlite = false + node_shared_zstd = false +} + assert(!node_enable_inspector || node_use_openssl, "node_enable_inspector requires node_use_openssl") diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py index 436767e633e1..d464d4b5859c 100755 --- a/tools/generate_config_gypi.py +++ b/tools/generate_config_gypi.py @@ -68,18 +68,19 @@ def translate_config(out_dir, config, v8_config): bool_string_to_number(config['node_enable_inspector']), 'shlib_suffix': 'dylib' if sys.platform == 'darwin' else 'so', 'tsan': bool_string_to_number(config['is_tsan']), - # TODO(zcbenz): Shared components are not supported in GN config yet. 'node_shared': 'false', - 'node_shared_brotli': 'false', - 'node_shared_cares': 'false', - 'node_shared_http_parser': 'false', - 'node_shared_libuv': 'false', - 'node_shared_nghttp2': 'false', + 'node_shared_brotli': config['node_shared_brotli'], + 'node_shared_cares': config['node_shared_cares'], + 'node_shared_hdr_histogram': config['node_shared_hdr_histogram'], + 'node_shared_http_parser': config['node_shared_http_parser'], + 'node_shared_libuv': config['node_shared_libuv'], + 'node_shared_nghttp2': config['node_shared_nghttp2'], 'node_shared_nghttp3': 'false', 'node_shared_ngtcp2': 'false', 'node_shared_openssl': 'false', - 'node_shared_sqlite': 'false', + 'node_shared_sqlite': config['node_shared_sqlite'], 'node_shared_zlib': 'false', + 'node_shared_zstd': config['node_shared_zstd'], } } config_gypi['variables'].update(v8_config)