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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 if (current_cpu == "arm") { 6 if (current_cpu == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
10 import("//build/config/mips.gni") 10 import("//build/config/mips.gni")
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 ] 187 ]
188 } 188 }
189 189
190 cflags += common_mac_flags 190 cflags += common_mac_flags
191 191
192 # Without this, the constructors and destructors of a C++ object inside 192 # Without this, the constructors and destructors of a C++ object inside
193 # an Objective C struct won't be called, which is very bad. 193 # an Objective C struct won't be called, which is very bad.
194 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ] 194 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ]
195 195
196 cflags_c += [ "-std=c99" ] 196 cflags_c += [ "-std=c99" ]
197 cflags_cc += [ "-std=gnu++11" ]
198 197
199 ldflags += common_mac_flags 198 ldflags += common_mac_flags
200 } else if (is_posix) { 199 } else if (is_posix) {
201 # Non-Mac Posix compiler flags setup. 200 # Non-Mac Posix compiler flags setup.
202 # ----------------------------------- 201 # -----------------------------------
203 if (gcc_version >= 48) { 202 if (gcc_version >= 48) {
204 cflags_cc += [ "-std=gnu++11" ] 203 cflags_cc += [ "-std=gnu++11" ]
205 } 204 }
206 205
207 if (enable_profiling && !is_debug) { 206 if (enable_profiling && !is_debug) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if (linux_use_bundled_binutils) { 405 if (linux_use_bundled_binutils) {
407 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", 406 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
408 root_build_dir) 407 root_build_dir)
409 cflags += [ "-B$binutils_path" ] 408 cflags += [ "-B$binutils_path" ]
410 } 409 }
411 410
412 # Clang-specific compiler flags setup. 411 # Clang-specific compiler flags setup.
413 # ------------------------------------ 412 # ------------------------------------
414 if (is_clang) { 413 if (is_clang) {
415 cflags += [ "-fcolor-diagnostics" ] 414 cflags += [ "-fcolor-diagnostics" ]
416 cflags_cc += [ "-std=gnu++11" ] 415 cflags_cc += [ "-std=gnu++11" ]
Nico 2015/04/14 15:17:16 It should be -std=c++11 on non-linux
Jiang Jiang 2015/04/14 15:28:44 So basically: if (is_clang) { ... if (is_li
417 } 416 }
418 417
419 # Android-specific flags setup. 418 # Android-specific flags setup.
420 # ----------------------------- 419 # -----------------------------
421 if (is_android) { 420 if (is_android) {
422 cflags += [ 421 cflags += [
423 "-ffunction-sections", 422 "-ffunction-sections",
424 "-funwind-tables", 423 "-funwind-tables",
425 "-fno-short-enums", 424 "-fno-short-enums",
426 ] 425 ]
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 cflags += [ "-gsplit-dwarf" ] 1080 cflags += [ "-gsplit-dwarf" ]
1082 } 1081 }
1083 } 1082 }
1084 } 1083 }
1085 1084
1086 config("no_symbols") { 1085 config("no_symbols") {
1087 if (!is_win) { 1086 if (!is_win) {
1088 cflags = [ "-g0" ] 1087 cflags = [ "-g0" ]
1089 } 1088 }
1090 } 1089 }
OLDNEW
« 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