[clang] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake (PR #106407)

Konrad Kleine via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 14:08:32 PDT 2024


https://github.com/kwk updated https://github.com/llvm/llvm-project/pull/106407

>From ca503d037c9e05bd986dfe56296059c691db822a Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine at redhat.com>
Date: Wed, 28 Aug 2024 17:22:29 +0200
Subject: [PATCH] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake

Take all `LLVM_RELEASE_FINAL_STAGE_TARGETS` elements and append them prefixed
with `stage2-` to `CLANG_BOOTSTRAP_TARGETS`.
---
 clang/cmake/caches/Release.cmake | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index 6d5f75ca0074ee..50c8696402b938 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -55,15 +55,23 @@ set(STAGE1_RUNTIMES "compiler-rt")
 
 if (LLVM_RELEASE_ENABLE_PGO)
   list(APPEND STAGE1_PROJECTS "lld")
-  set(CLANG_BOOTSTRAP_TARGETS
+  set(tmp_targets
     generate-profdata
     stage2-package
     stage2-clang
+    stage2
     stage2-install
     stage2-check-all
     stage2-check-llvm
     stage2-check-clang CACHE STRING "")
 
+  foreach(X IN LISTS LLVM_RELEASE_FINAL_STAGE_TARGETS)
+    list(APPEND tmp_targets "stage2-${X}")
+  endforeach()
+  list(REMOVE_DUPLICATES tmp_targets)
+
+  set(CLANG_BOOTSTRAP_TARGETS "${tmp_targets}" CACHE STRING "")
+
   # Configuration for stage2-instrumented
   set(BOOTSTRAP_CLANG_ENABLE_BOOTSTRAP ON CACHE STRING "")
   # This enables the build targets for the final stage which is called stage2.



More information about the cfe-commits mailing list