[gn build] allow setting clang_base_path to a source-absolute path
authorNico Weber <thakis@chromium.org>
Fri, 5 Mar 2021 17:13:51 +0000 (12:13 -0500)
committerNico Weber <thakis@chromium.org>
Fri, 5 Mar 2021 17:13:51 +0000 (12:13 -0500)
commit98c6d3194ed90217ca6ce7e451d31ea246d2afff
tree8521fff9bcac9bf89dc4f205a9ebffaf5200e300
parent90085d9286ef8f1d24d9352d7e3ccac365a9cdf0
[gn build] allow setting clang_base_path to a source-absolute path

With this, you can set `clang_base_path = "//out/gn1"` in `out/gn2/args.gn` and
the build in out/gn2 will use clang and lld from out/gn1.

Setting `clang_base_path` to an absolute path (with e.g.
`clang_base_path = getenv("HOME") + "/src/..."`) should behave as before.

Differential Revision: https://reviews.llvm.org/D97989
llvm/utils/gn/build/toolchain/BUILD.gn