mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 03:07:54 +01:00
build: sync V8 warning cflags with BUILD.gn
PR-URL: https://github.com/nodejs/node/pull/52873 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
parent
25c788009f
commit
2b657ccfb3
@ -3,7 +3,6 @@
|
||||
'configuring_node%': 0,
|
||||
'asan%': 0,
|
||||
'ubsan%': 0,
|
||||
'werror': '', # Turn off -Werror in V8 build.
|
||||
'visibility%': 'hidden', # V8's visibility setting
|
||||
'target_arch%': 'ia32', # set v8's target architecture
|
||||
'host_arch%': 'ia32', # set v8's host architecture
|
||||
|
@ -82,7 +82,6 @@
|
||||
'v8_toolset_for_shell%': 'target',
|
||||
|
||||
'host_os%': '<(OS)',
|
||||
'werror%': '-Werror',
|
||||
# For a shared library build, results in "libv8-<(soname_version).so".
|
||||
'soname_version%': '',
|
||||
|
||||
@ -133,21 +132,33 @@
|
||||
'<(V8_ROOT)',
|
||||
'<(V8_ROOT)/include',
|
||||
],
|
||||
'cflags!': ['-Wall', '-Wextra'],
|
||||
'conditions': [
|
||||
['clang==1', {
|
||||
'cflags': [ '-Werror', '-Wno-unknown-pragmas' ],
|
||||
},{
|
||||
'cflags!': [ '-Wall', '-Wextra' ],
|
||||
['clang==0 and OS!="win"', {
|
||||
'cflags': [
|
||||
# In deps/v8/BUILD.gn: if (!is_clang && !is_win) { cflags += [...] }
|
||||
'-Wno-strict-overflow',
|
||||
'-Wno-return-type',
|
||||
'-Wno-int-in-bool-context',
|
||||
'-Wno-deprecated',
|
||||
'-Wno-stringop-overflow',
|
||||
'-Wno-stringop-overread',
|
||||
'-Wno-restrict',
|
||||
'-Wno-array-bounds',
|
||||
'-Wno-nonnull',
|
||||
'-Wno-dangling-pointer',
|
||||
# On by default in Clang and V8 requires it at least for arm64.
|
||||
'-flax-vector-conversions',
|
||||
],
|
||||
}],
|
||||
['clang==1 or OS!="win"', {
|
||||
'cflags': [ '-Wno-invalid-offsetof' ],
|
||||
'cflags_cc': [
|
||||
# In deps/v8/BUILD.gn: if (is_clang || !is_win) { cflags += [...] }
|
||||
'-Wno-invalid-offsetof',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS': ['-Wno-invalid-offsetof']
|
||||
# -Wno-invalid-offsetof
|
||||
'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO',
|
||||
},
|
||||
}],
|
||||
['v8_target_arch=="arm"', {
|
||||
@ -434,9 +445,6 @@
|
||||
['_toolset=="target"', {
|
||||
'conditions': [
|
||||
['v8_target_arch==target_arch', {
|
||||
'cflags': [
|
||||
'-Wno-error=array-bounds', # Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
|
||||
],
|
||||
'conditions': [
|
||||
['v8_target_arch=="mips64el"', {
|
||||
'cflags': ['-EL'],
|
||||
|
@ -2132,12 +2132,6 @@
|
||||
]
|
||||
}],
|
||||
],
|
||||
# -Wno-invalid-offsetof flag is not valid for C.
|
||||
# The flag is initially set in `toolchain.gypi` for all targets.
|
||||
'cflags!': [ '-Wno-invalid-offsetof' ],
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS!': ['-Wno-invalid-offsetof']
|
||||
},
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(V8_ROOT)/third_party/zlib',
|
||||
|
Loading…
Reference in New Issue
Block a user