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)
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 "" )
106106endif ()
107107
108108# Stage 1 Common Config
@@ -144,3 +144,7 @@ set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
144144set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING )
145145
146146set_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