Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(945)

Unified Diff: build/toolchain/mac/BUILD.gn

Issue 2613503002: GN: avoid going through compiler wrapper for "link" tool for macOS/iOS. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 4c091ed6fad519bea0a4d1d0545748f584e3021a..dc544e72ee6e5f6131930406fec1ad2a5cd33bb4 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -83,6 +83,17 @@ template("mac_toolchain") {
host_toolchain = host_toolchain
}
+ # Supports building with the version of clang shipped with Xcode when
+ # targetting iOS by not respecting clang_base_path.
+ if (toolchain_args.current_os == "ios" && use_xcode_clang) {
+ prefix = ""
+ } else {
+ prefix = rebase_path("$clang_base_path/bin/", root_build_dir)
+ }
+
+ _cc = "${prefix}clang"
+ _cxx = "${prefix}clang++"
+
# When the invoker has explicitly overridden use_goma or cc_wrapper in the
# toolchain args, use those values, otherwise default to the global one.
# This works because the only reasonable override that toolchains might
@@ -109,13 +120,9 @@ template("mac_toolchain") {
compiler_prefix = ""
}
- if (toolchain_args.current_os != "ios" || !use_xcode_clang) {
- compiler_prefix += rebase_path("$clang_base_path/bin/", root_build_dir)
- }
-
- cc = "${compiler_prefix}clang"
- cxx = "${compiler_prefix}clang++"
- ld = cxx
+ cc = compiler_prefix + _cc
+ cxx = compiler_prefix + _cxx
+ ld = _cxx
linker_driver =
"TOOL_VERSION=${tool_versions.linker_driver} " +
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698