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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 } else if (is_android && is_clang && | 349 } else if (is_android && is_clang && |
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 # On cast Android x86, --icf=all causes issues. |
360 # doesn't currently work. Once it does, use icf=all everywhere. | |
361 # Additionally, on Android x86 --icf=safe seems to cause issues as well. | |
362 # Additionally, on cast Android x86, --icf=all causes issues. | |
363 if (is_android && current_cpu == "x86") { | 360 if (is_android && current_cpu == "x86") { |
364 ldflags += [ "-Wl,--icf=none" ] | 361 ldflags += [ "-Wl,--icf=none" ] |
365 } else if (is_clang || (current_cpu != "x86" && current_cpu != "x64")) { | 362 } else { |
Dirk Pranke
2016/07/15 21:08:42
won't this still break linux/gcc x86? From my read
stevenjb
2016/07/15 21:12:07
I didn't read through all of it, I assumed that si
llozano
2016/07/15 21:12:27
this has been in use by chromeos for a while but i
Dirk Pranke
2016/07/15 21:30:05
I agree that we should update the comment, possibl
stevenjb
2016/07/15 21:36:49
So, I don't really understand the problem or the s
| |
366 ldflags += [ "-Wl,--icf=all" ] | 363 ldflags += [ "-Wl,--icf=all" ] |
367 } else if (!is_android) { | |
368 ldflags += [ "-Wl,--icf=safe" ] | |
369 } | 364 } |
370 } | 365 } |
371 | 366 |
372 if (linux_use_bundled_binutils) { | 367 if (linux_use_bundled_binutils) { |
373 cflags += [ "-B$binutils_path" ] | 368 cflags += [ "-B$binutils_path" ] |
374 } | 369 } |
375 | 370 |
376 # Clang-specific compiler flags setup. | 371 # Clang-specific compiler flags setup. |
377 # ------------------------------------ | 372 # ------------------------------------ |
378 if (is_clang) { | 373 if (is_clang) { |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1566 | 1561 |
1567 if (is_ios || is_mac) { | 1562 if (is_ios || is_mac) { |
1568 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1563 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1569 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1564 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1570 config("enable_arc") { | 1565 config("enable_arc") { |
1571 common_flags = [ "-fobjc-arc" ] | 1566 common_flags = [ "-fobjc-arc" ] |
1572 cflags_objc = common_flags | 1567 cflags_objc = common_flags |
1573 cflags_objcc = common_flags | 1568 cflags_objcc = common_flags |
1574 } | 1569 } |
1575 } | 1570 } |
OLD | NEW |