[libcxx-commits] [libcxx] [libcxxabi] [libcxx][cmake] Allow using FatLTO in libc++ builds (PR #112277)
Petr Hosek via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 15 23:40:21 PDT 2024
petrhosek wrote:
We use [`HandleLLVMOptions`](https://github.com/llvm/llvm-project/blob/e55869ae8a4ef1ae2e898ff5cd66fb8ae6e099b8/runtimes/CMakeLists.txt#L166) in the runtimes build and support existing LLVM options. That's why there's no `LIBCXX_USE_SANITIZER` (and `LIBCXXABI_USE_SANITIZER` or `LIBUNWIND_USE_SANITIZER`), instead we simply reuse `LLVM_USE_SANITIZER`. That's why `LLVM_ENABLE_FATLTO` should already work and we shouldn't be introducing new options like `LIBCXX_ENABLE_FATLTO`.
It should be sufficient to simply set `LLVM_ENABLE_FATLTO` in the cache file like https://github.com/llvm/llvm-project/blob/e55869ae8a4ef1ae2e898ff5cd66fb8ae6e099b8/clang/cmake/caches/Fuchsia-stage2.cmake and most importantly test that everything is working as expected (and address any issues as needed).
https://github.com/llvm/llvm-project/pull/112277
More information about the libcxx-commits
mailing list