Reland "ios: Use lld for host part of the build"
This relands https://chromium-review.googlesource.com/c/chromium/src/+/3015403 https://chromium-review.googlesource.com/c/chromium/src/+/3052554 rolled in an lld that should support profiling builds. Bug: 1218048 Change-Id: I362db96fbbbe49013fcb0239ce435631c8cae9f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3053990 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#905334}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
b91d721330
commit
b5372dfc6c
build
@ -200,7 +200,7 @@ declare_args() {
|
||||
# Set to true to use lld, the LLVM linker.
|
||||
# In late bring-up on macOS (see docs/mac_lld.md), and not functional at all for
|
||||
# iOS. The default linker everywhere else.
|
||||
use_lld = is_clang && (!is_apple || target_os == "mac")
|
||||
use_lld = is_clang && !is_ios
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
|
@ -83,6 +83,11 @@ template("apple_toolchain") {
|
||||
} else {
|
||||
toolchain_cc_wrapper = cc_wrapper
|
||||
}
|
||||
if (defined(toolchain_args.use_lld)) {
|
||||
toolchain_uses_lld = toolchain_args.use_lld
|
||||
} else {
|
||||
toolchain_uses_lld = use_lld
|
||||
}
|
||||
if (defined(toolchain_args.use_xcode_clang)) {
|
||||
toolchain_uses_xcode_clang = toolchain_args.use_xcode_clang
|
||||
} else {
|
||||
@ -119,7 +124,7 @@ template("apple_toolchain") {
|
||||
|
||||
# Set the explicit search path for clang++ so it uses the right linker
|
||||
# binary.
|
||||
if (!use_lld) {
|
||||
if (!toolchain_uses_lld) {
|
||||
ld += " -B " + invoker.bin_path
|
||||
}
|
||||
|
||||
@ -244,7 +249,7 @@ template("apple_toolchain") {
|
||||
tool("alink") {
|
||||
rspfile = "{{output}}.rsp"
|
||||
|
||||
if (!use_lld) {
|
||||
if (!toolchain_uses_lld) {
|
||||
# Note about -filelist: Apple's linker reads the file list file and
|
||||
# interprets each newline-separated chunk of text as a file name. It
|
||||
# doesn't do the things one would expect from the shell like unescaping
|
||||
|
@ -21,6 +21,9 @@ template("mac_toolchain") {
|
||||
current_os = "mac"
|
||||
|
||||
if (target_os == "ios") {
|
||||
# Use LLD for the host part of a chrome/ios build.
|
||||
use_lld = true
|
||||
|
||||
# TODO(crbug.com/753445): the use_sanitizer_coverage arg is currently
|
||||
# not supported by the Chromium mac_clang_x64 toolchain on iOS
|
||||
# distribution.
|
||||
|
Reference in New Issue
Block a user