[cfe-dev] [RFC] Changing tool search path priority

Fangrui Song via cfe-dev cfe-dev at lists.llvm.org
Thu May 14 22:58:21 PDT 2020

On 2020-05-14, Joerg Sonnenberger via cfe-dev wrote:
>On Thu, May 14, 2020 at 03:11:23PM +0100, David Spickett wrote:
>> > ...but I don't think we should ever be looking for
>> > ${DEFAULT_TRIPLE}-gcc. That doesn't make sense to me at all.
>> IIt was added in https://reviews.llvm.org/D13340. Quoting a comment there:
>> ""LLVMDefaultTargetTriple is the value specified with the CMake
>> variable -DLLVM_DEFAULT_TARGET_TRIPLE= during configuration time. For
>> example, using --target=mips64el-mti-linux will search for files prefixed
>> with either mips64el-mti-linux-{as,ld} and mips-mti-linux-{as,ld} in our
>> toolchain where we specify -DLLVM_DEFAULT_TARGET_TRIPLE=mips-mti-linux."
>> I guess that allows you to only package one copy of tools that can handle
>> both targets.
>That seems ..strangely specific. We certainly have cases where multiple
>architecture variants are targetting a single binutils environment in
>NetBSD, but those are all controlled by the appropiate flags to the
>tools. The default target doesn't leak through and I don't think it ever
>should. That completely defeats the goal of a universal toolchain.

I vote for not checking ${LLVM_DEFAULT_TARGET_TRIPLE}-gcc if --target is

CCed people from https://reviews.llvm.org/D13340

More information about the cfe-dev mailing list