[clang] [flang] [llvm] [CMake][Release] Statically link clang with stage1 runtimes (PR #127268)
Tobias Hieta via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 08:08:02 PST 2025
================
@@ -90,9 +88,17 @@ else()
set(CLANG_BOOTSTRAP_TARGETS ${LLVM_RELEASE_FINAL_STAGE_TARGETS} CACHE STRING "")
endif()
+if (LLVM_RELEASE_ENABLE_LTO)
+ # Enable LTO for the runtimes. We need to configure stage1 clang to default
+ # to using lld as the linker because the stage1 toolchain will be used to
+ # build and link the runtimes.
+ set(RUNTIMES_CMAKE_ARGS "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DLLVM_ENABLE_LLD=ON" CACHE STRING "")
----------------
tru wrote:
That's odd. Maybe we could at least say why we are not using that flag there since that's the one that's documented in the llvm documentation.
https://github.com/llvm/llvm-project/pull/127268
More information about the llvm-commits
mailing list