Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |