[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 01:02:39 PDT 2024


MaskRay wrote:

```
cmake -Sllvm -B/tmp/out/d-a64 -G Ninja -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-gnu -DLLVM_USE_LINKER=lld -DLLVM_ENABLE_RUNTIMES="compiler-rt;libunwind" -DLLVM_ENABLE_PROJECTS="clang;lld" -DCMAKE_C_COMPILER=~/Stable/bin/clang -DCMAKE_CXX_COMPILER=~/Stable/bin/clang++ -DCMAKE_BUILD_TYPE=Debug
ninja -C /tmp/out/d-a64 builtins
```
gives me `/tmp/out/d-a64/lib/clang/19/lib/aarch64-linux-gnu/clang_rt.*`. Sanitizer targets are not available. I haven't investigated why.

Anyhow, I posted a similar but probably more complete clang driver patch: https://reviews.llvm.org/D110663 , but I concluded that detecting Debian-style `x86_64-linux-gnu` is not a good idea. 

It's better to do some normalization in CMake.



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


More information about the cfe-commits mailing list