summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-16 22:37:18 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-16 22:37:18 +0000
commitce889c26aa74dbae9c73082b5387ca6813f01f3f (patch)
tree7bf88972d9da9810ca9b82279969e8b9ffabd4d9 /build/common.gypi
parentb0e69a67af8590ad6cce164f06f70b14ac44497d (diff)
downloadchromium_src-ce889c26aa74dbae9c73082b5387ca6813f01f3f.zip
chromium_src-ce889c26aa74dbae9c73082b5387ca6813f01f3f.tar.gz
chromium_src-ce889c26aa74dbae9c73082b5387ca6813f01f3f.tar.bz2
Use c++11 on clang/android
stlport doesn't have any c++11 library features, but this turns on the language features. (With clang only, gcc is still in c++98 mode for now.) BUG=none R=cjhopman@chromium.org Review URL: https://codereview.chromium.org/18493006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi36
1 files changed, 14 insertions, 22 deletions
diff --git a/build/common.gypi b/build/common.gypi
index c0e6158..3ec6df0 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -3137,15 +3137,9 @@
# Warns when a const char[] is converted to bool.
'-Wstring-conversion',
- ],
- 'cflags!': [
- # Clang doesn't seem to know know this flag.
- '-mfpmath=sse',
- ],
- }],
- ['clang==1 and OS!="android"', {
- # Turn on C++11.
- 'cflags': [
+
+ # C++11-related flags:
+
# 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
@@ -3163,6 +3157,10 @@
# http://crbug.com/255186
'-Wno-deprecated-register',
],
+ 'cflags!': [
+ # Clang doesn't seem to know know this flag.
+ '-mfpmath=sse',
+ ],
'cflags_cc': [
# See the comment in the Mac section for what it takes to move
# this to -std=c++11.
@@ -3170,19 +3168,13 @@
],
}],
['clang==1 and OS=="android"', {
- # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
- # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
- # Doesn't work with asan for some reason either: crbug.com/233464
- 'cflags': [
- # Especially needed for gtest macros using enum values from Mac
- # system headers.
- # TODO(pkasting): In C++11 this is legal, so this should be
- # removed when we change to that. (This is also why we don't
- # bother fixing all these cases today.)
- '-Wno-unnamed-type-template-args',
- # This (rightfully) complains about 'override', which we use
- # heavily.
- '-Wno-c++11-extensions',
+ # Android uses stlport, whose include/new defines
+ # `void operator delete[](void* ptr) throw();`, which
+ # clang's -Wimplicit-exception-spec-mismatch warns about for some
+ # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
+ # via -isystem instead.
+ 'cflags_cc': [
+ '-Wno-implicit-exception-spec-mismatch',
],
}],
['clang==1 and clang_use_chrome_plugins==1', {