Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node_enable_deprecated_declarations_warnings GN flag #181

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/openssl/unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ template("openssl_gn_build") {
"openssl/crypto/include",
"openssl/include",
]
defines = [ "OPENSSL_API_COMPAT=0x10100001L" ]
}

config("openssl_internal_config") {
Expand All @@ -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) {
Expand Down
18 changes: 16 additions & 2 deletions unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -33,7 +39,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" ]
Expand Down Expand Up @@ -64,7 +70,6 @@ template("node_gn_build") {
libs = []
cflags = [ "-Wno-microsoft-include" ]
cflags_cc = [
"-Wno-deprecated-declarations",
"-Wno-extra-semi",
"-Wno-implicit-fallthrough",
"-Wno-macro-redefined",
Expand All @@ -82,6 +87,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 {
Expand All @@ -100,6 +109,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",
Expand Down
Loading