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

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

Issue 2088823002: Remove toolchain definition to build with gcc on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-uses-xcode-clang
Patch Set: Remove constant parameters to mac_toolchain template Created 4 years, 6 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 a58c3b4e67266d1eb7e8952b7b1350aebbd8f2a8..a26c06dd1b1d42cf3db9c2509b5bc97642d17e4d 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -27,11 +27,10 @@ if (use_goma) {
compiler_prefix = ""
}
-if (use_xcode_clang) {
- _clang_prefix = ""
-} else {
- _clang_prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin/",
- root_build_dir)
+if (!use_xcode_clang) {
+ compiler_prefix = compiler_prefix +
+ rebase_path("//third_party/llvm-build/Release+Asserts/bin/",
+ root_build_dir)
}
if (current_toolchain == default_toolchain) {
@@ -77,9 +76,6 @@ assert(tool_versions != "")
# build args in this definition.
template("mac_toolchain") {
toolchain(target_name) {
- assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value")
- assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value")
- assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value")
assert(defined(invoker.toolchain_cpu),
"mac_toolchain() must specify a \"toolchain_cpu\"")
assert(defined(invoker.toolchain_os),
@@ -87,12 +83,9 @@ template("mac_toolchain") {
# concurrent_links is picked up from the declare_arg().
- # We can't do string interpolation ($ in strings) on things with dots in
- # them. To allow us to use $cc below, for example, we create copies of
- # these values in our scope.
- cc = invoker.cc
- cxx = invoker.cxx
- ld = invoker.ld
+ cc = "${compiler_prefix}clang"
+ cxx = "${compiler_prefix}clang++"
+ ld = cxx
linker_driver =
"TOOL_VERSION=${tool_versions.linker_driver} " +
@@ -350,10 +343,7 @@ template("mac_toolchain") {
host_toolchain = host_toolchain
target_os = target_os
target_cpu = target_cpu
-
- if (defined(invoker.is_clang)) {
- is_clang = invoker.is_clang
- }
+ is_clang = true
}
}
}
@@ -361,71 +351,29 @@ template("mac_toolchain") {
mac_toolchain("clang_arm") {
toolchain_cpu = "arm"
toolchain_os = "mac"
- cc = "${compiler_prefix}${_clang_prefix}clang"
- cxx = "${compiler_prefix}${_clang_prefix}clang++"
- ld = cxx
- is_clang = true
-}
-
-mac_toolchain("arm") {
- toolchain_cpu = "arm"
- toolchain_os = "mac"
- cc = "${compiler_prefix}gcc"
- cxx = "${compiler_prefix}g++"
- ld = cxx
- is_clang = false
}
mac_toolchain("clang_x64") {
toolchain_cpu = "x64"
toolchain_os = "mac"
- cc = "${compiler_prefix}${_clang_prefix}clang"
- cxx = "${compiler_prefix}${_clang_prefix}clang++"
- ld = cxx
- is_clang = true
-}
-
-mac_toolchain("x64") {
- toolchain_cpu = "x64"
- toolchain_os = "mac"
- cc = "${compiler_prefix}gcc"
- cxx = "${compiler_prefix}g++"
- ld = cxx
- is_clang = false
}
mac_toolchain("ios_clang_arm") {
toolchain_cpu = "arm"
- toolchain_os = "mac"
- cc = "${compiler_prefix}${_clang_prefix}clang"
- cxx = "${compiler_prefix}${_clang_prefix}clang++"
- ld = cxx
- is_clang = true
+ toolchain_os = "ios"
}
mac_toolchain("ios_clang_arm64") {
toolchain_cpu = "arm64"
- toolchain_os = "mac"
- cc = "${compiler_prefix}${_clang_prefix}clang"
- cxx = "${compiler_prefix}${_clang_prefix}clang++"
- ld = cxx
- is_clang = true
+ toolchain_os = "ios"
}
mac_toolchain("ios_clang_x86") {
toolchain_cpu = "x86"
- toolchain_os = "mac"
- cc = "${compiler_prefix}${_clang_prefix}clang"
- cxx = "${compiler_prefix}${_clang_prefix}clang++"
- ld = cxx
- is_clang = true
+ toolchain_os = "ios"
}
mac_toolchain("ios_clang_x64") {
toolchain_cpu = "x64"
- toolchain_os = "mac"
- cc = "${compiler_prefix}${_clang_prefix}clang"
- cxx = "${compiler_prefix}${_clang_prefix}clang++"
- ld = cxx
- is_clang = true
+ toolchain_os = "ios"
}
« 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