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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 (current_cpu == "mipsel" || current_cpu == "mips64el")) { | 350 (current_cpu == "mipsel" || current_cpu == "mips64el")) { |
351 # Let clang find the ld.bfd in the NDK. | 351 # Let clang find the ld.bfd in the NDK. |
352 _rebased_android_toolchain_root = | 352 _rebased_android_toolchain_root = |
353 rebase_path(android_toolchain_root, root_build_dir) | 353 rebase_path(android_toolchain_root, root_build_dir) |
354 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] | 354 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] |
355 } | 355 } |
356 | 356 |
357 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && | 357 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && |
358 !(is_android && use_order_profiling)) { | 358 !(is_android && use_order_profiling)) { |
359 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all | 359 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all |
360 # doesn't currently work. Once it does, use icf=all everywhere. | 360 # doesn't currently work on non-chromeos platforms. |
361 # Additionally, on Android x86 --icf=safe seems to cause issues as well. | 361 # Additionally, on Android x86 --icf=safe seems to cause issues as well. |
362 # Additionally, on cast Android x86, --icf=all causes issues. | 362 # Additionally, on cast Android x86, --icf=all causes issues. |
363 if (is_android && current_cpu == "x86") { | 363 if (is_android && current_cpu == "x86") { |
364 ldflags += [ "-Wl,--icf=none" ] | 364 ldflags += [ "-Wl,--icf=none" ] |
365 } else if (is_clang || (current_cpu != "x86" && current_cpu != "x64")) { | 365 } else if (is_clang || is_chromeos || |
| 366 (current_cpu != "x86" && current_cpu != "x64")) { |
366 ldflags += [ "-Wl,--icf=all" ] | 367 ldflags += [ "-Wl,--icf=all" ] |
367 } else if (!is_android) { | 368 } else if (!is_android) { |
368 ldflags += [ "-Wl,--icf=safe" ] | 369 ldflags += [ "-Wl,--icf=safe" ] |
369 } | 370 } |
370 } | 371 } |
371 | 372 |
372 if (linux_use_bundled_binutils) { | 373 if (linux_use_bundled_binutils) { |
373 cflags += [ "-B$binutils_path" ] | 374 cflags += [ "-B$binutils_path" ] |
374 } | 375 } |
375 | 376 |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 | 1567 |
1567 if (is_ios || is_mac) { | 1568 if (is_ios || is_mac) { |
1568 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1569 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1569 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1570 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1570 config("enable_arc") { | 1571 config("enable_arc") { |
1571 common_flags = [ "-fobjc-arc" ] | 1572 common_flags = [ "-fobjc-arc" ] |
1572 cflags_objc = common_flags | 1573 cflags_objc = common_flags |
1573 cflags_objcc = common_flags | 1574 cflags_objcc = common_flags |
1574 } | 1575 } |
1575 } | 1576 } |
OLD | NEW |