Skip to content

Commit 32b91ec

Browse files
committed
[cmake] Fix -fno-lifetime-dse not being passed to GCC
A follow-up to #92953. This should fix unexpected performance gains when Clang is built with GCC, and fix downstream LTO crashes reported in 4feae05#r142466703
1 parent bc946f5 commit 32b91ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
672672
append("-Werror=unguarded-availability-new" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
673673
endif()
674674

675-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GCC")
675+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
676676
# LLVM data structures like llvm::User and llvm::MDNode rely on
677677
# the value of object storage persisting beyond the lifetime of the
678678
# object (#24952). This is not standard compliant and causes a runtime

0 commit comments

Comments
 (0)