[gn build] make stage2_unix_toolchain set clang_base_path
authorNico Weber <thakis@chromium.org>
Fri, 3 Jul 2020 17:52:18 +0000 (13:52 -0400)
committerNico Weber <thakis@chromium.org>
Sat, 4 Jul 2020 23:36:09 +0000 (19:36 -0400)
commit05c5ff5ab0b4d7cec25210bce7444827c25d71b1
treef0aa23607a02ac1d89c1fdec029a1d3d36ea21c0
parentf804bd586ee58199db4cfb2da8e9ef067425900b
[gn build] make stage2_unix_toolchain set clang_base_path

This fixes the build of compiler-rt on macOS when _not_ using
clang_base_path in args.gn: Xcode clang knows where to find the
SDK, but regular clang doesn't and needs a -isysroot parameter.
We correctly add that parameter when clang_base_path is set,
but else we omit it. If clang_base_path was not set, we also
didn't add the flag for stage2_unix_toolchain() when we build
compiler-rt with just-built clang.

Make stage2_unix_toolchain() use clang_base_path instead of setting
cc / cxx. It's less code, and it gets things like this right.
llvm/utils/gn/build/toolchain/BUILD.gn