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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 if (is_android && is_clang) { | 314 if (is_android && is_clang) { |
315 _rebased_android_toolchain_root = | 315 _rebased_android_toolchain_root = |
316 rebase_path(android_toolchain_root, root_build_dir) | 316 rebase_path(android_toolchain_root, root_build_dir) |
317 | 317 |
318 # Let clang find the linker in the NDK. | 318 # Let clang find the linker in the NDK. |
319 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] | 319 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] |
320 } | 320 } |
321 | 321 |
322 if (is_posix && use_lld && !is_nacl) { | 322 if (is_posix && use_lld && !is_nacl) { |
323 ldflags += [ "-fuse-ld=lld" ] | 323 ldflags += [ "-fuse-ld=lld" ] |
| 324 |
| 325 # LLD as of 2016/12/02 seems to behave poorly with multi-threading. |
| 326 # Disable threads on LLD trunk bots to see if they hurt build time. |
| 327 if (llvm_force_head_revision) { |
| 328 ldflags += [ "-Wl,-no-threads" ] |
| 329 } |
324 } else if (use_gold) { | 330 } else if (use_gold) { |
325 ldflags += [ "-fuse-ld=gold" ] | 331 ldflags += [ "-fuse-ld=gold" ] |
326 if (is_android) { | 332 if (is_android) { |
327 # Use -mstackrealign due to a bug on ia32 Jelly Bean. | 333 # Use -mstackrealign due to a bug on ia32 Jelly Bean. |
328 # See crbug.com/521527 | 334 # See crbug.com/521527 |
329 if (current_cpu == "x86") { | 335 if (current_cpu == "x86") { |
330 cflags += [ "-mstackrealign" ] | 336 cflags += [ "-mstackrealign" ] |
331 } | 337 } |
332 } else { | 338 } else { |
333 # On Android, this isn't needed. gcc in the NDK knows to look next to | 339 # On Android, this isn't needed. gcc in the NDK knows to look next to |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 | 1641 |
1636 if (is_ios || is_mac) { | 1642 if (is_ios || is_mac) { |
1637 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1643 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1638 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1644 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1639 config("enable_arc") { | 1645 config("enable_arc") { |
1640 common_flags = [ "-fobjc-arc" ] | 1646 common_flags = [ "-fobjc-arc" ] |
1641 cflags_objc = common_flags | 1647 cflags_objc = common_flags |
1642 cflags_objcc = common_flags | 1648 cflags_objcc = common_flags |
1643 } | 1649 } |
1644 } | 1650 } |
OLD | NEW |