[compiler-rt] [libcxx] CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE (PR #89234)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 03:04:02 PDT 2024


mstorsjo wrote:

> What I see for baremetal builds is that a target triple of `aarch64-none-elf` (`<arch>-<sys>-<env>`) is getting internally defaulted to search for libraries at `aarch64-none-unknown-elf` (`<arch>-<vendor>-<sys>-<env>`) but I understand this represents a change of the `<sys>` part of the triple from `none` to `unknown`?
> 
> Is this intended? One consequence is that my existing cross compiler setup which uses symlinked clang binaries `aarch64-none-elf-clang -> clang` stopped working because it searches for builtins at `/lib/clang/19/lib/aarch64-none-unknown-elf/libclang_rt.builtins.a`.
> 
> In response to this change I am currently building compiler-rt with an explicit triple of `aarch64-unknown-none-elf`.
> 
> My expectation was that I should be able to continue to use my old `aarch64-none-elf-clang` and the extra part of the triple would be considered when searching for libraries, where they would be found at `lib/aarch64-unknown-none/...`. Please correct me if I'm wrong.

While the normalization probably isn't right, I'm curious about how this change here affected things. As this change in itself only affected compiler-rt, not clang, it shouldn't have changed where clang looks for libraries, right? Or has something else changed that, too?

I.e., even before this change, both an `aarch64-none-elf-clang` symlink, and invoking `clang --target=aarch64-none-elf` should have already looked in the `<lib>/clang/16/lib/aarch64-none-unknown-elf` directory, right? That is - which change here is it that has changed where clang looks for things?

https://github.com/llvm/llvm-project/pull/89234


More information about the llvm-commits mailing list