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 use absolute paths when passing the default | |
441 # paths to the tools it invokes. We don't want this because we don't | |
442 # really need it and it can mess up the goma cache entries. It would | |
443 # be nice if it was on by default in clang, but it isn't. | |
444 # | |
445 # TODO(thakis): Figure out if this should be the default, and expose in | |
446 # clang-cl if not. | |
447 if (is_clang && !is_win) { | |
shinyak
2017/04/26 01:47:36
It looks pnacl-clang does not recognize -no-canoni
| |
448 cflags += [ "-no-canonical-prefixes" ] | |
449 } | |
450 | |
440 # C++11 compiler flags setup. | 451 # C++11 compiler flags setup. |
441 # --------------------------- | 452 # --------------------------- |
442 if (is_linux || is_android || (is_nacl && is_clang)) { | 453 if (is_linux || is_android || (is_nacl && is_clang)) { |
443 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 454 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
444 # GNU extension). | 455 # GNU extension). |
445 # TODO(thakis): Eventually switch this to c++11 instead, | 456 # TODO(thakis): Eventually switch this to c++11 instead, |
446 # http://crbug.com/427584 | 457 # http://crbug.com/427584 |
447 cflags_cc += [ "-std=gnu++11" ] | 458 cflags_cc += [ "-std=gnu++11" ] |
448 } else if (!is_win && !is_nacl) { | 459 } else if (!is_win && !is_nacl) { |
449 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | 460 # 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 | 1742 |
1732 if (is_ios || is_mac) { | 1743 if (is_ios || is_mac) { |
1733 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1744 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1734 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1745 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1735 config("enable_arc") { | 1746 config("enable_arc") { |
1736 common_flags = [ "-fobjc-arc" ] | 1747 common_flags = [ "-fobjc-arc" ] |
1737 cflags_objc = common_flags | 1748 cflags_objc = common_flags |
1738 cflags_objcc = common_flags | 1749 cflags_objcc = common_flags |
1739 } | 1750 } |
1740 } | 1751 } |
OLD | NEW |