From c2f9928e44be384c349b70890543726dbfc7d3e9 Mon Sep 17 00:00:00 2001 From: Alexey Gladkov Date: Mon, 27 Aug 2018 14:59:55 +0300 Subject: [PATCH 24/24] ALT: allow to override clang through env variables --- build/toolchain/gcc_toolchain.gni | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni index b6f63d7556a..c09ad531b8d 100644 --- a/build/toolchain/gcc_toolchain.gni +++ b/build/toolchain/gcc_toolchain.gni @@ -597,27 +597,27 @@ template("gcc_toolchain") { # actually just be doing a native compile. The invoker can optionally override # use_gold too. template("clang_toolchain") { if (defined(invoker.toolprefix)) { toolprefix = invoker.toolprefix } else { toolprefix = "" } gcc_toolchain(target_name) { - prefix = rebase_path("$clang_base_path/bin", root_build_dir) - cc = "$prefix/clang" - cxx = "$prefix/clang++" + cc = getenv("CC") + cxx = getenv("CXX") + ar = getenv("AR") ld = cxx readelf = "${toolprefix}readelf" - ar = "${prefix}/llvm-ar" - nm = "${toolprefix}nm" + readelf = "readelf" + nm = "nm" forward_variables_from(invoker, [ "strip", "is_clang_analysis_supported", "enable_linker_map", "use_unstripped_as_runtime_outputs", ]) toolchain_args = { -- 2.17.1