From 9991bb7c62462e3a42aa981883f0e6e404e616d9 Mon Sep 17 00:00:00 2001 From: John Barboza Date: Thu, 3 Aug 2017 03:48:24 -0400 Subject: [PATCH] build: avoid -fstrict-aliasing compile option Libuv is not aliasing-safe if you consider aliasing to be nominal rather than structural and it's not as if it makes much of a difference in the quality of the generated code, at least for libuv. PR-URL: https://github.com/libuv/libuv/pull/1457 Reviewed-By: Ben Noordhuis --- common.gypi | 5 ----- uv.gyp | 5 ----- 2 files changed, 10 deletions(-) diff --git a/common.gypi b/common.gypi index 821fb79c..816847bf 100644 --- a/common.gypi +++ b/common.gypi @@ -32,7 +32,6 @@ }, 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '0', - 'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ], }, 'conditions': [ ['OS != "zos"', { @@ -48,7 +47,6 @@ 'defines': [ 'NDEBUG' ], 'cflags': [ '-O3', - '-fstrict-aliasing', ], 'msvs_settings': { 'VCCLCompilerTool': { @@ -178,9 +176,6 @@ 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics 'PREBINDING': 'NO', # No -Wl,-prebind 'USE_HEADERMAP': 'NO', - 'OTHER_CFLAGS': [ - '-fstrict-aliasing', - ], 'WARNING_CFLAGS': [ '-Wall', '-Wendif-labels', diff --git a/uv.gyp b/uv.gyp index 07458995..38765eef 100644 --- a/uv.gyp +++ b/uv.gyp @@ -224,11 +224,6 @@ '_DARWIN_UNLIMITED_SELECT=1', ] }], - [ 'OS!="mac" and OS!="zos"', { - # Enable on all platforms except OS X. The antique gcc/clang that - # ships with Xcode emits waaaay too many false positives. - 'cflags': [ '-Wstrict-aliasing' ], - }], [ 'OS=="linux"', { 'defines': [ '_GNU_SOURCE' ], 'sources': [