Commit c67e8ca8 authored by thakis@chromium.org's avatar thakis@chromium.org

mac: Build in C++11 mode.

BUG=none

Review URL: https://codereview.chromium.org/11316240

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170969 0039d316-1c4b-4281-b951-d872f2087c98
parent f702d57b
...@@ -3247,21 +3247,42 @@ ...@@ -3247,21 +3247,42 @@
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'WARNING_CFLAGS': [ 'WARNING_CFLAGS': [
'-Wheader-hygiene', '-Wheader-hygiene',
# This warns on using ints as initializers for floats in
# initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
# which happens in several places in chrome code. Not sure if
# this is worth fixing.
'-Wno-c++11-narrowing',
# This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
# user-defined literals, this is now a string literal with a UD
# suffix. However, this is used heavily in NaCl code, so disable
# the warning for now.
'-Wno-reserved-user-defined-literal',
# Don't die on dtoa code that uses a char as an array index. # Don't die on dtoa code that uses a char as an array index.
# This is required solely for base/third_party/dmg_fp/dtoa.cc. # This is required solely for base/third_party/dmg_fp/dtoa.cc.
'-Wno-char-subscripts', '-Wno-char-subscripts',
# Clang spots more unused functions. # Clang spots more unused functions.
'-Wno-unused-function', '-Wno-unused-function',
# See comments on this flag higher up in this file.
'-Wno-unnamed-type-template-args',
# This (rightfully) complains about 'override', which we use
# heavily.
'-Wno-c++11-extensions',
# Warns on switches on enums that cover all enum values but # Warns on switches on enums that cover all enum values but
# also contain a default: branch. Chrome is full of that. # also contain a default: branch. Chrome is full of that.
'-Wno-covered-switch-default', '-Wno-covered-switch-default',
], ],
'OTHER_CPLUSPLUSFLAGS': [
# gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
# defined. (Else e.g. finite() in base/float_util.h needs to
# be isfinite() which doesn't exist on the android bots.)
# typeof() is also disabled in c++11 (but we could use
# decltype() instead).
# TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
# bots use xcode 4 -- http://crbug.com/147515).
# TODO(thakis): Eventually switch this to c++11 instead of
# gnu++11 (once typeof can be removed, which is blocked on c++11
# being available everywhere).
'$(inherited)', '-std=gnu++11',
],
}], }],
['clang==1 and clang_use_chrome_plugins==1', { ['clang==1 and clang_use_chrome_plugins==1', {
'OTHER_CFLAGS': [ 'OTHER_CFLAGS': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment