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

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

Issue 227693007: Fix the Mac toolchain definition in the GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: line wrapping Created 6 years, 8 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 | « build/toolchain/gcc_toolchain.gni ('k') | 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 35f80b02824640809fde9fdd985232d73b02adb9..8613d1fe584b61e6d68e131da7c7f0558c47cf02 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -59,6 +59,22 @@ exec_script("setup_toolchain.py", [ gyp_mac_tool_source ], "value")
# build args in this definition.
template("mac_clang_toolchain") {
toolchain(target_name) {
+ assert(defined(invoker.cc),
+ "mac_clang_toolchain() must specify a \"cc\" value")
+ assert(defined(invoker.cxx),
+ "mac_clang_toolchain() must specify a \"cxx\" value")
+ assert(defined(invoker.ld),
+ "mac_clang_toolchain() must specify a \"ld\" value")
+ assert(defined(invoker.toolchain_os),
+ "mac_clang_toolchain() must specify a \"toolchain_os\"")
+
+ # 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
+
# Make these apply to all tools below.
lib_prefix = "-l"
lib_dir_prefix="-L"
@@ -124,7 +140,7 @@ template("mac_clang_toolchain") {
}
toolchain_args() {
- os = toolchain_os
+ os = invoker.toolchain_os
}
}
}
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698