diff --git a/deps/openssl/unofficial.gni b/deps/openssl/unofficial.gni index 6cc699c900d1ff..73003df1ace368 100644 --- a/deps/openssl/unofficial.gni +++ b/deps/openssl/unofficial.gni @@ -16,6 +16,7 @@ template("openssl_gn_build") { "openssl/crypto/include", "openssl/include", ] + defines = [ "OPENSSL_API_COMPAT=0x10100001L" ] } config("openssl_internal_config") { @@ -26,7 +27,6 @@ template("openssl_gn_build") { defines = [ "MODULESDIR=\"deps/openssl/lib/openssl-modules\"", - "OPENSSL_API_COMPAT=0x10100001L", "STATIC_LEGACY", ] + gypi_values.openssl_default_defines_all if (is_win) { diff --git a/unofficial.gni b/unofficial.gni index 1caadb8834618d..ff78bee2364735 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -6,6 +6,12 @@ import("node.gni") import("$node_v8_path/gni/snapshot_toolchain.gni") import("$node_v8_path/gni/v8.gni") +declare_args() { + # Enable warnings about usages of deprecated declarations and suppress + # known issues with c-ares. + node_enable_deprecated_declarations_warnings = false +} + # The actual configurations are put inside a template in unofficial.gni to # prevent accidental edits from contributors. template("node_gn_build") { @@ -38,7 +44,7 @@ template("node_gn_build") { defines += [ "HAVE_INSPECTOR=0" ] } if (node_use_node_code_cache) { - defines += [ "NODE_USE_NODE_CODE_CACHE=1"] + defines += [ "NODE_USE_NODE_CODE_CACHE=1" ] } if (v8_enable_i18n_support) { defines += [ "NODE_HAVE_I18N_SUPPORT=1" ] @@ -69,7 +75,6 @@ template("node_gn_build") { libs = [] cflags = [ "-Wno-microsoft-include" ] cflags_cc = [ - "-Wno-deprecated-declarations", "-Wno-extra-semi", "-Wno-implicit-fallthrough", "-Wno-macro-redefined", @@ -88,6 +93,10 @@ template("node_gn_build") { "-Wno-unused-function", ] + if (!node_enable_deprecated_declarations_warnings) { + cflags_cc += [ "-Wno-deprecated-declarations" ] + } + if (current_cpu == "x86") { node_arch = "ia32" } else { @@ -106,6 +115,11 @@ template("node_gn_build") { "NODE_REPORT" ] + if (node_enable_deprecated_declarations_warnings) { + # Refs: https://github.com/nodejs/node/issues/52464 + defines += [ "CARES_NO_DEPRECATED=1" ] + } + if (is_win) { defines += [ "NOMINMAX",