[llvm-branch-commits] [clang] [CMake] Preserve clang.pre-bolt (PR #109351)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 20 08:05:40 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Amir Ayupov (aaupov)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/109351.diff


1 Files Affected:

- (modified) clang/CMakeLists.txt (+5-2) 


``````````diff
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 46e1412c0727aa..07eeb8a451b58b 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -923,11 +923,14 @@ if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED)
   )
   add_custom_command(OUTPUT ${CLANG_OPTIMIZED}
     DEPENDS clang-bolt-profile
+    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:clang> ${CLANG_PATH}.prebolt
+    COMMAND ${CMAKE_COMMAND} -E create_symlink ${CLANG_PATH}.prebolt ${CLANG_PATH}++.prebolt
     COMMAND llvm-bolt ${CLANG_PATH}
       -o ${CLANG_OPTIMIZED}
       -data ${BOLT_FDATA}
-      -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions
-      -split-all-cold -split-eh -dyno-stats -icf=1 -use-gnu-stack
+      -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions
+      -split-all-cold -split-eh -dyno-stats -use-gnu-stack
+      -split-strategy=cdsplit
       ${BOLT_NO_LBR}
     COMMAND ${CMAKE_COMMAND} -E rename ${CLANG_OPTIMIZED} $<TARGET_FILE:clang>
     COMMENT "Optimizing Clang with BOLT"

``````````

</details>


https://github.com/llvm/llvm-project/pull/109351


More information about the llvm-branch-commits mailing list