diff --git a/node.gyp b/node.gyp index f9c9a7fdb5..8bf0855407 100644 --- a/node.gyp +++ b/node.gyp @@ -537,7 +537,7 @@ # Putting these explicitly here so not to depend on `common.gypi`. # `common.gypi` need to be more general because it is used to build userland native addons. # Refs: https://github.com/nodejs/node-gyp/issues/1118 - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-c++98-compat-extra-semi',], + 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-c++98-compat-extra-semi', '-Wno-error=c++98-compat-extra-semi', ], 'xcode_settings': { 'WARNING_CFLAGS': [ '-Wall', @@ -545,7 +545,6 @@ '-W', '-Wno-unused-parameter', '-Werror=undefined-inline', - '-Werror=extra-semi', '-Wno-c++98-compat-extra-semi', ], }, @@ -561,7 +560,7 @@ 'conditions': [ ['clang==0 and OS!="win"', { - 'cflags': [ '-Wno-restrict', ], + 'cflags': [ '-Wno-restrict', '-Wno-c++98-compat-extra-semi', ], }], # Pointer authentication for ARM64. ['target_arch=="arm64"', { @@ -584,6 +583,7 @@ ], }], ['OS=="linux" and clang==1', { + 'cflags': [ '-Wno-c++98-compat-extra-semi', ], 'libraries': ['-latomic'], }], ], @@ -654,9 +654,9 @@ 'conditions': [ [ 'error_on_warn=="true"', { - 'cflags': ['-Werror'], + 'cflags': ['-Werror', '-Wno-c++98-compat-extra-semi', '-Wno-error=c++98-compat-extra-semi'], 'xcode_settings': { - 'WARNING_CFLAGS': [ '-Werror' ], + 'WARNING_CFLAGS': [ '-Werror', '-Wno-error=c++98-compat-extra-semi' ], }, }], [ 'node_intermediate_lib_type=="static_library" and ' @@ -976,9 +976,9 @@ ] }], [ 'error_on_warn=="true"', { - 'cflags': ['-Werror'], + 'cflags': ['-Werror', '-Wno-error=c++98-compat-extra-semi'], 'xcode_settings': { - 'WARNING_CFLAGS': [ '-Werror' ], + 'WARNING_CFLAGS': [ '-Werror', '-Wno-error=c++98-compat-extra-semi' ], }, }], [ 'node_builtin_modules_path!=""', { diff --git a/node.gypi b/node.gypi index 519d78652c..5b019c7133 100644 --- a/node.gypi +++ b/node.gypi @@ -342,6 +342,11 @@ [ 'node_shared_otlp_http_exporter=="false"', { 'dependencies': [ 'deps/opentelemetry-cpp/otlp-http-exporter.gyp:otlp-http-exporter' ], + 'direct_dependent_settings': { + 'cflags': [ + '-Wno-c++98-compat-extra-semi', + ], + }, 'conditions': [ [ 'force_load=="true"', { 'xcode_settings': {