Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: build/common.gypi

Issue 11316240: mac: Build in C++11 mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 9e90c3a14b7d67421a4d446eb4aa2f4b854af983..268a333e3534f05dcf5588b2de399ac891a8f238 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -3247,21 +3247,42 @@
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'WARNING_CFLAGS': [
'-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.
# This is required solely for base/third_party/dmg_fp/dtoa.cc.
'-Wno-char-subscripts',
# Clang spots more unused functions.
'-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
# also contain a default: branch. Chrome is full of that.
'-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', {
'OTHER_CFLAGS': [
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698