Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion clang/cmake/caches/Release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if (LLVM_RELEASE_ENABLE_LTO)
# FIXME: We can't use LLVM_ENABLE_LTO=Thin here, because it causes the CMake
# step for the libcxx build to fail. CMAKE_INTERPROCEDURAL_OPTIMIZATION does
# enable ThinLTO, though.
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DLLVM_ENABLE_LLD=ON" CACHE STRING "")
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_FATLTO=ON" CACHE STRING "")
endif()

# Stage 1 Common Config
Expand Down Expand Up @@ -144,3 +144,7 @@ set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)

set_final_stage_var(LLVM_USE_STATIC_ZSTD "ON" BOOL)
if (LLVM_RELEASE_ENABLE_LTO)
set_final_stage_var(LLVM_ENABLE_FATLTO "ON" BOOL)
set_final_stage_var(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_LIST_DIR}/release_cpack_pre_build_strip_lto.cmake" STRING)
endif()
5 changes: 5 additions & 0 deletions clang/cmake/caches/release_cpack_pre_build_strip_lto.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
file(GLOB files ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/lib/*.a ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/lib/*.so*)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need *.so here? Those shouldn't contain LTO bitcode, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and they don't, so I've dropped this part.


foreach(file ${files})
execute_process(COMMAND ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/bin/llvm-strip --no-strip-all -R .llvm.lto ${file})
endforeach()
Loading