diff options
author | mcgrathr <mcgrathr@chromium.org> | 2016-01-07 12:26:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-07 20:27:58 +0000 |
commit | 678f42a5815a53f9883807b37bd3a253e4bb9b18 (patch) | |
tree | 31a8bed99ba90516e00b23e113a691b9bcf6670f /build/config | |
parent | 2aad0c5da8d2c4a6721715d6f54db1553d4d2d66 (diff) | |
download | chromium_src-678f42a5815a53f9883807b37bd3a253e4bb9b18.zip chromium_src-678f42a5815a53f9883807b37bd3a253e4bb9b18.tar.gz chromium_src-678f42a5815a53f9883807b37bd3a253e4bb9b18.tar.bz2 |
GN: Use -std=gnu++0x for nacl_x86_glibc toolchain
The nacl_x86_glibc toolchain doesn't support -std=gnu++11 or
-std=c++11 but it does support -std=gnu++0x and -std=c++0x.
PPAPI tests built under this toolchain (among other toolchains)
use parts of base/ that have begun using some C++11 features that
require -std=gnu++0x to build with nacl_x86_glibc.
R=brettw@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/1568683002
Cr-Commit-Position: refs/heads/master@{#368143}
Diffstat (limited to 'build/config')
-rw-r--r-- | build/config/compiler/BUILD.gn | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index d52185a..00da421 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -312,17 +312,19 @@ config("compiler") { # C++11 compiler flags setup. # --------------------------- - if (is_linux || is_android || (is_nacl && is_clang)) { + if (is_linux || is_android || + (is_nacl && (is_clang || current_cpu == "arm"))) { # gnu++11 instead of c++11 is needed because some code uses typeof() (a # GNU extension). # TODO(thakis): Eventually switch this to c++11 instead, # http://crbug.com/427584 cflags_cc += [ "-std=gnu++11" ] - } else if (!is_win && !is_nacl) { - # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 - # or c++11; we technically don't need this toolchain any more, but there - # are still a few buildbots using it, so until those are turned off - # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. + } else if (is_nacl) { + # The NaCl x86 GCC toolchain doesn't support either gnu++11 + # or c++11, but it does support gnu++0x. This toolchain is + # used only for the nacl_x86_glibc PPAPI tests. + cflags_cc += [ "-std=gnu++0x" ] + } else if (!is_win) { cflags_cc += [ "-std=c++11" ] } |