diff --git a/common.gypi b/common.gypi index 32a298414b5392..207b98c9b6f36a 100644 --- a/common.gypi +++ b/common.gypi @@ -489,7 +489,12 @@ }], [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', { 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ], + 'cflags_cc': [ + '-fno-rtti', + '-fno-exceptions', + '-fno-strict-aliasing', + '-std=gnu++17', + ], 'defines': [ '__STDC_FORMAT_MACROS' ], 'ldflags': [ '-rdynamic' ], 'target_conditions': [ @@ -620,12 +625,10 @@ 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings + 'GCC_STRICT_ALIASING': 'NO', # -fno-strict-aliasing 'PREBINDING': 'NO', # No -Wl,-prebind 'MACOSX_DEPLOYMENT_TARGET': '11.0', # -mmacosx-version-min=11.0 'USE_HEADERMAP': 'NO', - 'OTHER_CFLAGS': [ - '-fno-strict-aliasing', - ], 'WARNING_CFLAGS': [ '-Wall', '-Wendif-labels', diff --git a/configure.py b/configure.py index 1831c089c97ce8..d1f69ce1e32c5d 100755 --- a/configure.py +++ b/configure.py @@ -1637,7 +1637,6 @@ def configure_v8(o, configs): o['variables']['v8_enable_javascript_promise_hooks'] = 1 o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0 o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 - o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs. o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1 o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0 o['variables']['v8_enable_object_print'] = 0 if options.v8_disable_object_print else 1 diff --git a/doc/api/process.md b/doc/api/process.md index cbadd124e4e28f..b08bfeaf1e497c 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1097,7 +1097,6 @@ An example of the possible output looks like: node_shared_zlib: 'false', node_use_openssl: 'true', node_shared_openssl: 'false', - strict_aliasing: 'true', target_arch: 'x64', v8_use_snapshot: 1 } diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index 9d1b0987167fc6..5bf396e074d755 100644 --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -69,9 +69,6 @@ # Enable profiling support. Only required on Windows. 'v8_enable_prof%': 0, - # Some versions of GCC 4.5 seem to need -fno-strict-aliasing. - 'v8_no_strict_aliasing%': 0, - # Chrome needs this definition unconditionally. For standalone V8 builds, # it's handled in gypfiles/standalone.gypi. 'want_separate_host_toolset%': 1, @@ -674,14 +671,6 @@ 'V8_ANDROID_LOG_STDOUT', ], }], - ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ - or OS=="netbsd" or OS=="qnx" or OS=="aix" or OS=="os400"', { - 'conditions': [ - [ 'v8_no_strict_aliasing==1', { - 'cflags': [ '-fno-strict-aliasing' ], - }], - ], # conditions - }], ['OS=="solaris"', { 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. }], @@ -838,7 +827,6 @@ ['OS=="mac"', { 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 - 'GCC_STRICT_ALIASING': 'YES', }, }], ['v8_enable_slow_dchecks==1', { @@ -897,12 +885,6 @@ ['OS=="mac"', { 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 - - # -fstrict-aliasing. Mainline gcc - # enables this at -O2 and above, - # but Apple gcc does not unless it - # is specified explicitly. - 'GCC_STRICT_ALIASING': 'YES', }, }], # OS=="mac" ['OS=="win"', {