Skip to content

Commit f11d979

Browse files
authored
[LTO] Extend CAS build workaround to LTO (#20814)
Shared library build fails with the same error Jinsong saw and fixed in e676cb0 as part of the pulldown. This was missed because we don't run the nightly as part of the pulldown CI, and we only do a shared library build in the nightly. Fix confirmed in https://github.com/intel/llvm/actions/runs/19906696122/job/57064646962 Closes: #20743 Signed-off-by: Nick Sarnie <[email protected]>
1 parent 27bcab9 commit f11d979

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/LTO/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
2+
# We append -fno-lifetime-dse in HandleLLVMOptions.cmake
3+
# append("-fno-lifetime-dse" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
4+
# But it is causing link failure with llvm::StdThreadPool::asyncEnqueue
5+
string(REPLACE "-fno-lifetime-dse" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
6+
endif ()
7+
18
add_llvm_component_library(LLVMLTO
29
LTO.cpp
310
LTOBackend.cpp

0 commit comments

Comments
 (0)