[llvm-branch-commits] [clang] release/22.x: [CMake][Release] Use llvm-bitcode-strip on Darwin for build with -ffat-lto-objects (#200764) (PR #201517)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 3 23:25:21 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: llvmbot
<details>
<summary>Changes</summary>
Backport b8e768f6ae95343ac542b195265572ecd063fc2b
Requested by: @<!-- -->c-rhodes
---
Full diff: https://github.com/llvm/llvm-project/pull/201517.diff
1 Files Affected:
- (modified) clang/cmake/caches/release_cpack_pre_build_strip_lto.cmake (+10-1)
``````````diff
diff --git a/clang/cmake/caches/release_cpack_pre_build_strip_lto.cmake b/clang/cmake/caches/release_cpack_pre_build_strip_lto.cmake
index 743b64fe00f58..e7d8830515439 100644
--- a/clang/cmake/caches/release_cpack_pre_build_strip_lto.cmake
+++ b/clang/cmake/caches/release_cpack_pre_build_strip_lto.cmake
@@ -1,5 +1,14 @@
file(GLOB files ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/lib/*.a)
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(strip_command
+ ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/bin/llvm-bitcode-strip)
+ set(strip_args -r)
+else()
+ set(strip_command ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/bin/llvm-strip)
+ set(strip_args --no-strip-all -R .llvm.lto)
+endif()
+
foreach(file ${files})
- execute_process(COMMAND ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/bin/llvm-strip --no-strip-all -R .llvm.lto ${file})
+ execute_process(COMMAND ${strip_command} ${strip_args} ${file} -o ${file})
endforeach()
``````````
</details>
https://github.com/llvm/llvm-project/pull/201517
More information about the llvm-branch-commits
mailing list