[flang-commits] [clang] [flang] [llvm] [CMake][Release] Statically link clang with stage1 runtimes (PR #127268)
Tom Stellard via flang-commits
flang-commits at lists.llvm.org
Wed Feb 19 08:02:12 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 "")
----------------
tstellar wrote:
`LLVM_ENABLE_LTO=Thin` causes some of the CMake checks for the runtime build to fail which fails the whole build. `-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON` does enable ThinLTO, so it's effectively the same.
https://github.com/llvm/llvm-project/pull/127268
More information about the flang-commits
mailing list