Mac: Explicitly disable -fstrict-aliasing.

Mark says: "When GCC_STRICT_ALIASING is YES, Xcode adds -fstrict-aliasing to the compiler command line. When it’s NO, it doesn’t add anything (not even -fno-strict-aliasing). Xcode doesn’t know that -fstrict-aliasing is on at our selected optimization level."

So add this directly to OTHER_CLFAGS.

BUG=32204
TEST=none

Review URL: http://codereview.chromium.org/6909037

git-svn-id: http://src.chromium.org/svn/trunk/src/build@84064 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
thakis@chromium.org 2011-05-04 15:33:19 +00:00
Родитель 9fe4eaece3
Коммит 5db427e01a
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -1028,12 +1028,7 @@
# Enable -Werror by default, but put it in a variable so it can
# be disabled in ~/.gyp/include.gypi on the valgrind builders.
'variables': {
# Use -fno-strict-aliasing by default since gcc 4.4 has periodic
# issues that slip through the cracks. We could do this just for
# gcc 4.4 but it makes more sense to be consistent on all
# compilers in use. TODO(Craig): turn this off again when
# there is some 4.4 test infrastructure in place and existing
# aliasing issues have been fixed.
# Use -fno-strict-aliasing, see http://crbug.com/32204
'no_strict_aliasing%': 1,
'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
['OS=="freebsd"', {'werror%': '',}],
@ -1382,6 +1377,9 @@
'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
'PREBINDING': 'NO', # No -Wl,-prebind
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing', # See http://crbug.com/32204
],
'WARNING_CFLAGS': [
'-Wall',
'-Wendif-labels',