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

Konrad Kleine via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 08:25:48 PDT 2024


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

Take all `LLVM_RELEASE_FINAL_STAGE_TARGETS` elements and append them prefixed with `stage2-` to `CLANG_BOOTSTRAP_TARGETS`.

>From 8abe54ca62eedc1a7a0307eb17d188090160bf30 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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index e5161dd9a27b96..4354a243f51e4e 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -68,6 +68,10 @@ if (LLVM_RELEASE_ENABLE_PGO)
   set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED IR CACHE STRING "")
   set(BOOTSTRAP_LLVM_ENABLE_RUNTIMES "compiler-rt" CACHE STRING "")
   set(BOOTSTRAP_LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "")
+  foreach(X IN LISTS LLVM_RELEASE_FINAL_STAGE_TARGETS)
+    list(APPEND CLANG_BOOTSTRAP_TARGETS "stage2-${X}")
+  endforeach()
+  list(REMOVE_DUPLICATES CLANG_BOOTSTRAP_TARGETS)
 
 else()
   if (LLVM_RELEASE_ENABLE_LTO)



More information about the cfe-commits mailing list