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 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 if (current_cpu == "arm") { | 7 if (current_cpu == "arm") { |
8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
9 } | 9 } |
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
515 } | 515 } |
516 | 516 |
517 # Clang-specific compiler flags setup. | 517 # Clang-specific compiler flags setup. |
518 # ------------------------------------ | 518 # ------------------------------------ |
519 if (is_clang) { | 519 if (is_clang) { |
520 cflags += [ "-fcolor-diagnostics" ] | 520 cflags += [ "-fcolor-diagnostics" ] |
521 } | 521 } |
522 | 522 |
523 # C++11 compiler flags setup. | 523 # C++11 compiler flags setup. |
524 # --------------------------- | 524 # --------------------------- |
525 if (is_linux || is_android || is_nacl) { | 525 if (is_linux || is_android || (is_nacl && is_clang)) { |
Nico
2015/09/05 01:03:20
I still don't understand this change. Why is this
Dirk Pranke
2015/09/05 01:37:20
the clang-based NaCl toolchains understand this fl
| |
526 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 526 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
527 # GNU extension). | 527 # GNU extension). |
528 # TODO(thakis): Eventually switch this to c++11 instead, | 528 # TODO(thakis): Eventually switch this to c++11 instead, |
529 # http://crbug.com/427584 | 529 # http://crbug.com/427584 |
530 cflags_cc += [ "-std=gnu++11" ] | 530 cflags_cc += [ "-std=gnu++11" ] |
531 } else if (!is_win) { | 531 } else if (!is_win && !is_nacl) { |
532 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | |
533 # or c++11; we technically don't need this toolchain any more, but there | |
534 # are still a few buildbots using it, so until those are turned off | |
535 # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. | |
532 cflags_cc += [ "-std=c++11" ] | 536 cflags_cc += [ "-std=c++11" ] |
533 } | 537 } |
534 | 538 |
535 # Android-specific flags setup. | 539 # Android-specific flags setup. |
536 # ----------------------------- | 540 # ----------------------------- |
537 if (is_android) { | 541 if (is_android) { |
538 cflags += [ | 542 cflags += [ |
539 "-ffunction-sections", | 543 "-ffunction-sections", |
540 "-funwind-tables", | 544 "-funwind-tables", |
541 "-fno-short-enums", | 545 "-fno-short-enums", |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1342 cflags += [ "-gsplit-dwarf" ] | 1346 cflags += [ "-gsplit-dwarf" ] |
1343 } | 1347 } |
1344 } | 1348 } |
1345 } | 1349 } |
1346 | 1350 |
1347 config("no_symbols") { | 1351 config("no_symbols") { |
1348 if (!is_win) { | 1352 if (!is_win) { |
1349 cflags = [ "-g0" ] | 1353 cflags = [ "-g0" ] |
1350 } | 1354 } |
1351 } | 1355 } |
OLD | NEW |