Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index 38e5fb6d3e97d211417865fe4a6f6f91bfefb8af..3b139f6574cd4c03ef7d7ce226f96166be6395cf 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -425,6 +425,11 @@ template("gcc_toolchain") { |
} |
} |
+declare_args() { |
+ # changes the path to the clang executable |
+ use_clang_prefix = "default" |
+} |
+ |
# This is a shorthand for gcc_toolchain instances based on the |
# Chromium-built version of Clang. Only the toolchain_cpu and |
# toolchain_os variables need to be specified by the invoker, and |
@@ -446,6 +451,9 @@ template("clang_toolchain") { |
gcc_toolchain(target_name) { |
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
root_build_dir) |
+ if (use_clang_prefix != "default") { |
+ prefix = use_clang_prefix |
dshwang
2016/01/20 15:05:05
how about naming similar to gyp 'make_clang_dir'?
mkollaro
2016/01/21 14:33:59
Done.
|
+ } |
cc = "$prefix/clang" |
cxx = "$prefix/clang++" |
ld = cxx |