0

Fix the Mac toolchain definition in the GN build.

I did not update this when I updated the template syntax.

This also fixes a typo in the GCC toolchain definition (it was just in some helpful assertions and didn't affect anything).

BUG=

Review URL: https://codereview.chromium.org/227693007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262491 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
brettw@chromium.org
2014-04-08 20:01:51 +00:00
parent f84364ada0
commit ff8cae509e
2 changed files with 20 additions and 4 deletions
build/toolchain

@ -19,11 +19,11 @@ template("gcc_toolchain") {
assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value")
assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value")
assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ld\" value")
assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value")
assert(defined(invoker.toolchain_cpu_arch),
"gcc_toolchain() must specify a \"toolchain_cpu_arch\"")
"gcc_toolchain() must specify a \"toolchain_cpu_arch\"")
assert(defined(invoker.toolchain_os),
"gcc_toolchain() must specify a \"toolchain_os\"")
"gcc_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

@ -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
}
}
}