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/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 ldflags += [ "-fuse-ld=bfd" ] | 343 ldflags += [ "-fuse-ld=bfd" ] |
344 } else if (is_android && current_cpu == "mipsel" && is_clang) { | 344 } else if (is_android && current_cpu == "mipsel" && is_clang) { |
345 # Let clang find the ld.bfd in the NDK. | 345 # Let clang find the ld.bfd in the NDK. |
346 _rebased_android_toolchain_root = | 346 _rebased_android_toolchain_root = |
347 rebase_path(android_toolchain_root, root_build_dir) | 347 rebase_path(android_toolchain_root, root_build_dir) |
348 ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] | 348 ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] |
349 } | 349 } |
350 | 350 |
351 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && | 351 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && |
352 !(is_android && use_order_profiling)) { | 352 !(is_android && use_order_profiling)) { |
353 ldflags += [ "-Wl,--icf=all" ] | 353 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all |
| 354 # doesn't currently work. Once it does, use icf=all everywhere. |
| 355 if (is_clang || (target_cpu != "x86" && target_cpu != "x64")) { |
| 356 ldflags += [ "-Wl,--icf=all" ] |
| 357 } else { |
| 358 ldflags += [ "-Wl,--icf=safe" ] |
| 359 } |
354 } | 360 } |
355 | 361 |
356 if (linux_use_bundled_binutils) { | 362 if (linux_use_bundled_binutils) { |
357 cflags += [ "-B$binutils_path" ] | 363 cflags += [ "-B$binutils_path" ] |
358 } | 364 } |
359 | 365 |
360 # Clang-specific compiler flags setup. | 366 # Clang-specific compiler flags setup. |
361 # ------------------------------------ | 367 # ------------------------------------ |
362 if (is_clang) { | 368 if (is_clang) { |
363 cflags += [ "-fcolor-diagnostics" ] | 369 cflags += [ "-fcolor-diagnostics" ] |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 | 1474 |
1469 if (is_ios || is_mac) { | 1475 if (is_ios || is_mac) { |
1470 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1476 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1471 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1477 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1472 config("enable_arc") { | 1478 config("enable_arc") { |
1473 common_flags = [ "-fobjc-arc" ] | 1479 common_flags = [ "-fobjc-arc" ] |
1474 cflags_objc = common_flags | 1480 cflags_objc = common_flags |
1475 cflags_objcc = common_flags | 1481 cflags_objcc = common_flags |
1476 } | 1482 } |
1477 } | 1483 } |
OLD | NEW |