Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index a6d47288799c3e16fcb74558afbea3c23958f0cd..8ca3e8a3fbd31691793f21773aa1b6f9bd3379ee 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -2,7 +2,8 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-# This template defines a GCC toolchain. |
+# This template defines a toolchain for something that works like gcc |
+# (including clang). |
# |
# It requires the following variables specifying the executables to run: |
# - cc |
@@ -23,6 +24,7 @@ |
# at the beginning and end for all targets in a toolchain. |
# - deps |
# Just fowarded to the toolchain definition. |
+# - is_clang |
template("gcc_toolchain") { |
toolchain(target_name) { |
assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") |
@@ -108,6 +110,9 @@ template("gcc_toolchain") { |
toolchain_args() { |
cpu_arch = invoker.toolchain_cpu_arch |
os = invoker.toolchain_os |
+ if (defined(invoker.is_clang)) { |
+ is_clang = invoker.is_clang |
+ } |
} |
if (defined(invoker.deps)) { |