| 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/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
| 10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 ldflags += [ "-fuse-ld=bfd" ] | 393 ldflags += [ "-fuse-ld=bfd" ] |
| 394 } | 394 } |
| 395 | 395 |
| 396 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && | 396 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && |
| 397 !(is_android && use_order_profiling)) { | 397 !(is_android && use_order_profiling)) { |
| 398 # TODO(thakis): Remove `!is_android` below once NDK gold has been rolled | 398 # TODO(thakis): Remove `!is_android` below once NDK gold has been rolled |
| 399 # with the fix for https://sourceware.org/bugzilla/show_bug.cgi?id=17704 | 399 # with the fix for https://sourceware.org/bugzilla/show_bug.cgi?id=17704 |
| 400 # merged. See also https://crbug.com/663886 | 400 # merged. See also https://crbug.com/663886 |
| 401 # `linux_use_bundled_binutils` is to avoid breaking Linux distros which may | 401 # `linux_use_bundled_binutils` is to avoid breaking Linux distros which may |
| 402 # still have a buggy gold. | 402 # still have a buggy gold. |
| 403 if (!is_android && linux_use_bundled_binutils) { | 403 # The bug only affects x86 and x64, so we can still use ICF when targeting |
| 404 # other architectures. |
| 405 if ((!is_android && linux_use_bundled_binutils) || |
| 406 !(current_cpu == "x86" || current_cpu == "x64")) { |
| 404 ldflags += [ "-Wl,--icf=all" ] | 407 ldflags += [ "-Wl,--icf=all" ] |
| 405 } | 408 } |
| 406 } | 409 } |
| 407 | 410 |
| 408 if (linux_use_bundled_binutils) { | 411 if (linux_use_bundled_binutils) { |
| 409 cflags += [ "-B$binutils_path" ] | 412 cflags += [ "-B$binutils_path" ] |
| 410 } | 413 } |
| 411 | 414 |
| 412 # Clang-specific compiler flags setup. | 415 # Clang-specific compiler flags setup. |
| 413 # ------------------------------------ | 416 # ------------------------------------ |
| (...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 | 1746 |
| 1744 if (is_ios || is_mac) { | 1747 if (is_ios || is_mac) { |
| 1745 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1748 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1746 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1749 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1747 config("enable_arc") { | 1750 config("enable_arc") { |
| 1748 common_flags = [ "-fobjc-arc" ] | 1751 common_flags = [ "-fobjc-arc" ] |
| 1749 cflags_objc = common_flags | 1752 cflags_objc = common_flags |
| 1750 cflags_objcc = common_flags | 1753 cflags_objcc = common_flags |
| 1751 } | 1754 } |
| 1752 } | 1755 } |
| OLD | NEW |