[flang-commits] [clang] [flang] [llvm] [flang][cmake][perf-training] Optimize flang with PGO and BOLT (PR #198863)
Paul Osmialowski via flang-commits
flang-commits at lists.llvm.org
Tue Jun 16 03:12:54 PDT 2026
================
@@ -0,0 +1,19 @@
+# Two-stage build of Flang with the 2nd stage optimized using BOLT
+
+set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+set(CLANG_BOLT "INSTRUMENT" CACHE STRING "")
+set(FLANG_BOLT ${CLANG_BOLT} CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS "-Wl,--emit-relocs,-znow" CACHE STRING "")
+set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--emit-relocs,-znow" CACHE STRING "")
+
+set(LLVM_ENABLE_PROJECTS "bolt;clang;flang" CACHE STRING "")
----------------
pawosm-arm wrote:
It shouldn't. The list of requirements should be kept minimal, and since this is a cached entry, it can be kept minimal (it won't overwrite explicit user's list of requirements). Unlike PGO and BOLT-PGO where there is an optional possibility to make use of lld, the BOLT alone does not make use of lld. The clang's equivalent of this file does not have it, and this one shouldn't have it either.
https://github.com/llvm/llvm-project/pull/198863
More information about the flang-commits
mailing list