diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 23:20:46 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 23:20:46 +0000 |
commit | 6d4327bf6b51d5187daff556c7da67949fd4f262 (patch) | |
tree | d02cf37ebfe072697a3092d463c591af9766c7b0 /build/config | |
parent | dedbb592f290fbbbfdc5a430c844bfd226f85ff4 (diff) | |
download | chromium_src-6d4327bf6b51d5187daff556c7da67949fd4f262.zip chromium_src-6d4327bf6b51d5187daff556c7da67949fd4f262.tar.gz chromium_src-6d4327bf6b51d5187daff556c7da67949fd4f262.tar.bz2 |
Turn on C++11 when building with gcc4.8+
Revert with prejudice (after filing bugs / pinging me ) if this regresses perf or similar.
BUG=377668
R=ajwong@chromium.org
TBR=brettw
Review URL: https://codereview.chromium.org/304453005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/config')
-rw-r--r-- | build/config/compiler/BUILD.gn | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 70f1fd2..8bfa234 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -105,6 +105,11 @@ config("compiler") { } else if (is_posix) { # Non-Mac Posix compiler flags setup. # ----------------------------------- + if (gcc_version >= 48) { + cflags_cc += [ + "-std=gnu++11", + ] + } # CPU architecture. We may or may not be doing a cross compile now, so for # simplicity we always explicitly set the architecture. @@ -572,6 +577,7 @@ config("default_warnings") { "-Wno-missing-field-initializers", # "struct foo f = {0};" "-Wno-unused-parameter", # Unused function parameters. ] + cflags_cc = [] if (is_mac) { cflags += [ @@ -604,6 +610,20 @@ config("default_warnings") { # Clang spots more unused functions. "-Wno-unused-function", ] + + if (!is_mac && !is_ios) { + cflags_cc += [ + "-Wno-reserved-user-defined-literal", + ] + } + } + if (gcc_version >= 48) { + cflags_cc += [ + # See comment for -Wno-c++11-narrowing. + "-Wno-narrowing", + # TODO(thakis): Remove, http://crbug.com/263960 + "-Wno-literal-suffix", + ] } # Suppress warnings about ABI changes on ARM (Clang doesn't give this @@ -621,7 +641,7 @@ config("default_warnings") { "-Wno-ignored-qualifiers", "-Wno-type-limits", ] - cflags_cc = [ + cflags_cc += [ # Disabling c++0x-compat should be handled in WebKit, but # this currently doesn't work because gcc_version is not set # correctly when building with the Android build system. |