[all-commits] [llvm/llvm-project] f9dbca: [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Sep 15 09:33:12 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f9dbca68d48e705f6d45df8f58d6b2ee88bce76c
https://github.com/llvm/llvm-project/commit/f9dbca68d48e705f6d45df8f58d6b2ee88bce76c
Author: Fangrui Song <i at maskray.me>
Date: 2021-09-15 (Wed, 15 Sep 2021)
Changed paths:
M llvm/CMakeLists.txt
Log Message:
-----------
[CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux
This makes the default build closer to a -DLLVM_ENABLE_RUNTIMES=all build.
The layout is arguably superior because different libraries of target triples
are in different directories, similar to GCC/Debian multiarch.
When LLVM_DEFAULT_TARGET_TRIPLE is x86_64-unknown-linux-gnu,
`lib/clang/14.0.0/lib/libclang_rt.asan-x86_64.a`
is moved to
`lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.a`.
In addition, if the host compiler supports -m32 (multilib),
`lib/clang/14.0.0/lib/libclang_rt.asan-i386.a`
is moved to
`lib/clang/14.0.0/lib/i386-unknown-linux-gnu/libclang_rt.asan.a`.
Clang has been detecting both paths for lib/Driver/ToolChains/Gnu.cpp since 2018 (D50547).
---
Note: Darwin needs to be disabled. The hierarchy needs to be sorted out.
The current -DLLVM_DEFAULT_TARGET_TRIPLE=off state is like:
```
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_ios.a
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_iossim.a
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_osx.a
```
Windows needs to be disabled: https://reviews.llvm.org/D107799?id=368557#2963311
Differential Revision: https://reviews.llvm.org/D107799
More information about the All-commits
mailing list