File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ if (LLVM_RELEASE_ENABLE_LTO)
102
102
# FIXME: We can't use LLVM_ENABLE_LTO=Thin here, because it causes the CMake
103
103
# step for the libcxx build to fail. CMAKE_INTERPROCEDURAL_OPTIMIZATION does
104
104
# 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 "" )
106
106
endif ()
107
107
108
108
# Stage 1 Common Config
@@ -144,3 +144,7 @@ set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
144
144
set_final_stage_var (CPACK_ARCHIVE_THREADS "0" STRING )
145
145
146
146
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
+ set_final_stage_var (CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_LIST_DIR} /release_cpack_pre_build_strip_lto.cmake" STRING )
150
+ endif ()
Original file line number Diff line number Diff line change
1
+ file (GLOB files ${CPACK_TEMPORARY_INSTALL_DIRECTORY} /lib/*.a )
2
+
3
+ foreach (file ${files} )
4
+ execute_process (COMMAND ${CPACK_TEMPORARY_INSTALL_DIRECTORY} /bin/llvm-strip --no-strip-all -R .llvm.lto ${file} )
5
+ endforeach ()
You can’t perform that action at this time.
0 commit comments