Use "${config.ClangBin}/llvm-" for TOOLS_PREFIX.

We're removing GNU binutils in Android T, so lets redirect any last
remaining users to the LLVM equivalents sooner rather than later.

(This won't "just work" for ld versus lld, but it's likely that anyone
using TOOLS_PREFIX will need a few other tweaks anyway, and including
the "llvm-" prefix seems like it will cover most other cases.)

Bug: http://b/185257607
Test: treehugger
Change-Id: Ibb5efbbef801419e7d8258d6d8b67572df66e7d0
This commit is contained in:
Elliott Hughes
2021-05-07 11:55:30 -07:00
parent aa4c712989
commit cd9ff091df

View File

@@ -288,9 +288,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
ctx.Strict(makePrefix+"OBJCOPY", "${config.ClangBin}/llvm-objcopy")
ctx.Strict(makePrefix+"LD", "${config.ClangBin}/lld")
ctx.Strict(makePrefix+"NDK_TRIPLE", config.NDKTriple(toolchain))
// TODO: work out whether to make this "${config.ClangBin}/llvm-", which
// should mostly work, or remove it.
ctx.Strict(makePrefix+"TOOLS_PREFIX", gccCmd(toolchain, ""))
ctx.Strict(makePrefix+"TOOLS_PREFIX", "${config.ClangBin}/llvm-")
// TODO: GCC version is obsolete now that GCC has been removed.
ctx.Strict(makePrefix+"GCC_VERSION", toolchain.GccVersion())
}