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 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
| 8 import("//build/config/compiler/compiler.gni") | 8 import("//build/config/compiler/compiler.gni") |
| 9 import("//build/config/nacl/config.gni") | 9 import("//build/config/nacl/config.gni") |
| 10 import("//build/toolchain/cc_wrapper.gni") | 10 import("//build/toolchain/cc_wrapper.gni") |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 | 430 |
| 431 # Makes builds independent of absolute file path. | 431 # Makes builds independent of absolute file path. |
| 432 # clang-cl (used if is_win) doesn't expose this flag. | 432 # clang-cl (used if is_win) doesn't expose this flag. |
| 433 # Currently disabled for nacl since its toolchain lacks this flag (too old). | 433 # Currently disabled for nacl since its toolchain lacks this flag (too old). |
| 434 # TODO(zforman): Once nacl's toolchain is updated, remove check. | 434 # TODO(zforman): Once nacl's toolchain is updated, remove check. |
| 435 if (is_clang && is_linux && strip_absolute_paths_from_debug_symbols) { | 435 if (is_clang && is_linux && strip_absolute_paths_from_debug_symbols) { |
| 436 absolute_path = rebase_path("//.") | 436 absolute_path = rebase_path("//.") |
| 437 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] | 437 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] |
| 438 } | 438 } |
| 439 | 439 |
| 440 # Tells the compiler not to pass the default paths to the tools it invokes. | |
|
Nico
2017/04/25 23:21:07
No, it tells the compiler to pass the default path
Dirk Pranke
2017/04/25 23:26:45
Thanks. Updated.
| |
| 441 # We don't want this because we don't really need it and it can mess up | |
| 442 # the goma cache entries. It would be nice if it was on by default in | |
| 443 # clang, but it isn't. | |
|
Nico
2017/04/25 23:29:20
Can you add a
# TODO(thakis): Figure out if this
Dirk Pranke
2017/04/26 00:39:30
Sure.
| |
| 444 if (is_clang && !is_win) { | |
| 445 cflags += [ "-fno-canonical-prefixes" ] | |
|
Nico
2017/04/25 23:21:07
It's spelled -no-canonical-prefixes without f I th
Dirk Pranke
2017/04/25 23:26:45
Done.
shinyak
2017/04/26 00:52:00
Yeah, -no-canonical-prefixes is correct.
(Could yo
| |
| 446 } | |
| 447 | |
| 440 # C++11 compiler flags setup. | 448 # C++11 compiler flags setup. |
| 441 # --------------------------- | 449 # --------------------------- |
| 442 if (is_linux || is_android || (is_nacl && is_clang)) { | 450 if (is_linux || is_android || (is_nacl && is_clang)) { |
| 443 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 451 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
| 444 # GNU extension). | 452 # GNU extension). |
| 445 # TODO(thakis): Eventually switch this to c++11 instead, | 453 # TODO(thakis): Eventually switch this to c++11 instead, |
| 446 # http://crbug.com/427584 | 454 # http://crbug.com/427584 |
| 447 cflags_cc += [ "-std=gnu++11" ] | 455 cflags_cc += [ "-std=gnu++11" ] |
| 448 } else if (!is_win && !is_nacl) { | 456 } else if (!is_win && !is_nacl) { |
| 449 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | 457 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 |
| (...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1731 | 1739 |
| 1732 if (is_ios || is_mac) { | 1740 if (is_ios || is_mac) { |
| 1733 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1741 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1734 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1742 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1735 config("enable_arc") { | 1743 config("enable_arc") { |
| 1736 common_flags = [ "-fobjc-arc" ] | 1744 common_flags = [ "-fobjc-arc" ] |
| 1737 cflags_objc = common_flags | 1745 cflags_objc = common_flags |
| 1738 cflags_objcc = common_flags | 1746 cflags_objcc = common_flags |
| 1739 } | 1747 } |
| 1740 } | 1748 } |
| OLD | NEW |