Skip to content

Commit abf0d25

Browse files
committed
[CMake][Release] Build with -ffat-lto-objects
Fixes #133580
1 parent 143cce7 commit abf0d25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/cmake/caches/Release.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if (LLVM_RELEASE_ENABLE_LTO)
102102
# FIXME: We can't use LLVM_ENABLE_LTO=Thin here, because it causes the CMake
103103
# step for the libcxx build to fail. CMAKE_INTERPROCEDURAL_OPTIMIZATION does
104104
# enable ThinLTO, though.
105-
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DLLVM_ENABLE_LLD=ON" CACHE STRING "")
105+
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_FATLTO=ON" CACHE STRING "")
106106
endif()
107107

108108
# Stage 1 Common Config
@@ -144,3 +144,6 @@ set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
144144
set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)
145145

146146
set_final_stage_var(LLVM_USE_STATIC_ZSTD "ON" BOOL)
147+
if (LLVM_RELEASE_ENABLE_LTO)
148+
set_final_stage_var(LLVM_ENABLE_FATLTO "ON" BOOL)
149+
endif()

0 commit comments

Comments
 (0)