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

Unified Diff: build/config/compiler/BUILD.gn

Issue 1083963002: Remove duplicate -std=gnu++11 flag for Mac gn build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try using gnu++11 for android and nacl builds Created 5 years, 8 months 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/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index b428f4b4ce7bc68e88c2c5a44056dac89d9b1291..c2171549fea963a3ecdfb6f1286e04a20295bb5b 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -194,16 +194,11 @@ config("compiler") {
cflags_objcc = [ "-fobjc-call-cxx-cdtors" ]
cflags_c += [ "-std=c99" ]
- cflags_cc += [ "-std=gnu++11" ]
ldflags += common_mac_flags
} else if (is_posix) {
# Non-Mac Posix compiler flags setup.
# -----------------------------------
- if (gcc_version >= 48) {
- cflags_cc += [ "-std=gnu++11" ]
- }
-
if (enable_profiling && !is_debug) {
# The GYP build spams this define into every compilation unit, as we do
# here, but it only appears to be used in base and a couple other places.
@@ -413,7 +408,18 @@ config("compiler") {
# ------------------------------------
if (is_clang) {
cflags += [ "-fcolor-diagnostics" ]
+ }
+
+ # C++11 compiler flags setup.
+ # ---------------------------
+ if (is_linux || is_android || is_nacl) {
+ # 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) {
+ cflags_cc += [ "-std=c++11" ]
}
# Android-specific flags setup.
« 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