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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 # TODO(thestig): Make this flag work with GN. | 335 # TODO(thestig): Make this flag work with GN. |
336 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan |
| is_msan)) { | 336 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan |
| is_msan)) { |
337 # ldflags += [ | 337 # ldflags += [ |
338 # "-Wl,--detect-odr-violations", | 338 # "-Wl,--detect-odr-violations", |
339 # ] | 339 # ] |
340 #} | 340 #} |
341 } else if (linux_use_bundled_binutils) { | 341 } else if (linux_use_bundled_binutils) { |
342 # Gold is the default linker for the bundled binutils so we explicitly | 342 # Gold is the default linker for the bundled binutils so we explicitly |
343 # enable the bfd linker when use_gold is not set. | 343 # enable the bfd linker when use_gold is not set. |
344 ldflags += [ "-fuse-ld=bfd" ] | 344 ldflags += [ "-fuse-ld=bfd" ] |
345 } else if (is_android && current_cpu == "mipsel" && is_clang) { | 345 } else if (is_android && is_clang && |
| 346 (current_cpu == "mipsel" || current_cpu == "mips64el")) { |
346 # Let clang find the ld.bfd in the NDK. | 347 # Let clang find the ld.bfd in the NDK. |
347 _rebased_android_toolchain_root = | 348 _rebased_android_toolchain_root = |
348 rebase_path(android_toolchain_root, root_build_dir) | 349 rebase_path(android_toolchain_root, root_build_dir) |
349 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] | 350 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] |
350 } | 351 } |
351 | 352 |
352 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && | 353 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && |
353 !(is_android && use_order_profiling)) { | 354 !(is_android && use_order_profiling)) { |
354 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all | 355 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all |
355 # doesn't currently work. Once it does, use icf=all everywhere. | 356 # doesn't currently work. Once it does, use icf=all everywhere. |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 | 612 |
612 if (mips_dsp_rev == 1) { | 613 if (mips_dsp_rev == 1) { |
613 cflags += [ "-mdsp" ] | 614 cflags += [ "-mdsp" ] |
614 } else if (mips_dsp_rev == 2) { | 615 } else if (mips_dsp_rev == 2) { |
615 cflags += [ "-mdspr2" ] | 616 cflags += [ "-mdspr2" ] |
616 } | 617 } |
617 | 618 |
618 cflags += [ "-m${mips_float_abi}-float" ] | 619 cflags += [ "-m${mips_float_abi}-float" ] |
619 } else if (current_cpu == "mips64el") { | 620 } else if (current_cpu == "mips64el") { |
620 if (mips_arch_variant == "r6") { | 621 if (mips_arch_variant == "r6") { |
621 cflags += [ | 622 if (is_clang) { |
622 "-mips64r6", | 623 if (is_android) { |
623 "-Wa,-mips64r6", | 624 cflags += [ |
624 ] | 625 "--target=mips64el-linux-android", |
625 ldflags += [ "-mips64r6" ] | 626 "-march=mips64el", |
| 627 "-mcpu=mips64r6", |
| 628 ] |
| 629 ldflags += [ "--target=mips64el-linux-android" ] |
| 630 } |
| 631 } else { |
| 632 cflags += [ |
| 633 "-mips64r6", |
| 634 "-Wa,-mips64r6", |
| 635 ] |
| 636 ldflags += [ "-mips64r6" ] |
| 637 } |
626 } else if (mips_arch_variant == "r2") { | 638 } else if (mips_arch_variant == "r2") { |
627 cflags += [ | 639 cflags += [ |
628 "-mips64r2", | 640 "-mips64r2", |
629 "-Wa,-mips64r2", | 641 "-Wa,-mips64r2", |
630 ] | 642 ] |
631 ldflags += [ "-mips64r2" ] | 643 ldflags += [ "-mips64r2" ] |
632 } | 644 } |
633 } else if (current_cpu == "pnacl" && is_nacl_nonsfi) { | 645 } else if (current_cpu == "pnacl" && is_nacl_nonsfi) { |
634 if (target_cpu == "x86" || target_cpu == "x64") { | 646 if (target_cpu == "x86" || target_cpu == "x64") { |
635 cflags += [ | 647 cflags += [ |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 | 1475 |
1464 if (is_ios || is_mac) { | 1476 if (is_ios || is_mac) { |
1465 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1477 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1466 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1478 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1467 config("enable_arc") { | 1479 config("enable_arc") { |
1468 common_flags = [ "-fobjc-arc" ] | 1480 common_flags = [ "-fobjc-arc" ] |
1469 cflags_objc = common_flags | 1481 cflags_objc = common_flags |
1470 cflags_objcc = common_flags | 1482 cflags_objcc = common_flags |
1471 } | 1483 } |
1472 } | 1484 } |
OLD | NEW |