Skip to content

Commit e3ef26d

Browse files
[llvm][CMake] Remove -fno-lifetime-dse (#173322)
Now that #24952 has been fixed by #170575, we no longer need to specify -fno-lifetime-dse when building with gcc.
1 parent 7d2d4f6 commit e3ef26d

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -713,16 +713,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
713713
append("-Werror=unguarded-availability-new" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
714714
endif()
715715

716-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND LLVM_ENABLE_LTO)
717-
# LLVM data structures like llvm::User and llvm::MDNode rely on
718-
# the value of object storage persisting beyond the lifetime of the
719-
# object (#24952). This is not standard compliant and causes a runtime
720-
# crash if LLVM is built with GCC and LTO enabled (#57740). Until
721-
# these bugs are fixed, we need to disable dead store eliminations
722-
# based on object lifetime.
723-
append("-fno-lifetime-dse" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
724-
endif ()
725-
726716
# Modules enablement for GCC-compatible compilers:
727717
if ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
728718
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})

0 commit comments

Comments
 (0)