[PATCH] D107799: [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 9 21:26:56 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/CMakeLists.txt:674-679
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
+else()
+ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
+endif()
+set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} CACHE BOOL
----------------
manojgupta wrote:
> Hmm, trying to understand the reason to make it default since users can already opt in. On Chrome OS, we'll have to disable it explictly (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF ?)
For most Linux distributions, they need to do nothing.
`ninja asan` uses the new path. `clang -fsanitize=address` picks the new path. `ninja install` installs the new file. Every step is transparent.
If a distributor copies the whole `lib/clang/14.0.0`, no care is needed.
If a build system does something special, e.g. a runtime file may be used in an ad-hoc way bypassing Clang, some adjustment may be needed.
If the distributor doesn't want to adjustment, `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=off` is the simplest approach.
Does Chrome OS do some stuff with the runtime paths so that this needs to be disabled?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107799/new/
https://reviews.llvm.org/D107799
More information about the llvm-commits
mailing list