[clang] [llvm] Mac release fix (PR #163026)
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 17 16:07:56 PDT 2025
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/163026
>From b2f00eb013f5174b1ab5199bb7cc4cab6d5ed059 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 11 Oct 2025 17:39:12 -0700
Subject: [PATCH 01/19] [Darwin][Driver] Prefer linking with toolchain's libc++
instead of system
Fixes #77653
---
clang/lib/Driver/ToolChains/Darwin.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index d2356ebdfa86c..7e2d62a6bfc94 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -667,6 +667,10 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
Args.addAllArgs(CmdArgs, {options::OPT_d_Flag, options::OPT_s, options::OPT_t,
options::OPT_Z_Flag, options::OPT_u_Group});
+ // Add local file paths to ensure the toolchain's libc++ is used instead of
+ // the system's.
+ ToolChain.AddFilePathLibArgs(Args, CmdArgs);
+
// Forward -ObjC when either -ObjC or -ObjC++ is used, to force loading
// members of static archive libraries which implement Objective-C classes or
// categories.
>From 91ccb95e699b47ceb93c873454685fe180a2f975 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 11 Oct 2025 17:40:31 -0700
Subject: [PATCH 02/19] XXX: testrelease builds which also hit this bug
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 83969b5490685..955a31aff9c14 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -1,5 +1,5 @@
name: Release Binaries
-
+# TEST
on:
workflow_dispatch:
inputs:
>From a0bb37c324b6dcaff28aff35bf39e2ebbf879bb7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 11 Oct 2025 21:17:27 -0700
Subject: [PATCH 03/19] Fix build failure
---
clang/lib/Driver/ToolChains/Darwin.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index 7e2d62a6bfc94..2c869d260211d 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -669,7 +669,7 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
// Add local file paths to ensure the toolchain's libc++ is used instead of
// the system's.
- ToolChain.AddFilePathLibArgs(Args, CmdArgs);
+ getToolChain().AddFilePathLibArgs(Args, CmdArgs);
// Forward -ObjC when either -ObjC or -ObjC++ is used, to force loading
// members of static archive libraries which implement Objective-C classes or
>From 19b27bb6a76188b58f4b1c8420bd04c7040a06e6 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 13 Oct 2025 16:57:08 -0700
Subject: [PATCH 04/19] XX: debug
---
.github/workflows/release-binaries-all.yml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index 0b52a08202f1a..7e408497d1819 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -88,9 +88,6 @@ jobs:
# We use ubuntu-22.04 rather than the latest version to make the built
# binaries more portable (eg functional aginast older glibc).
runs-on:
- - ubuntu-22.04
- - ubuntu-22.04-arm
- - macos-13
- macos-14
uses: ./.github/workflows/release-binaries.yml
>From ff8bd1fe008a0d05dd61147fcb7a5bed2335ba30 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 13 Oct 2025 17:01:57 -0700
Subject: [PATCH 05/19] Debug
---
.github/workflows/release-binaries.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 955a31aff9c14..9884027af5dc7 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -239,7 +239,15 @@ jobs:
ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
-
+
+ - name: Debug
+ shell: bash
+ if: always()
+ run: |
+ echo "int main(int argc, char** argv) { return 0; }" >> test.cpp
+ ${{ steps.setup-stage.outputs.build-prefix }}/build/bin/clang++ -### -fuse-ld=lld -stdlib=libc++ -Wl,--verbose test.cpp
+ ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build/lib/*
+
- uses: actions/upload-artifact at ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-release-binary
>From 6d91fcd5583670d5045985976903854fdd68bb88 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 14 Oct 2025 11:43:08 -0700
Subject: [PATCH 06/19] Fix/Debug
---
clang/lib/Driver/ToolChain.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 3d5cac62afe01..ac5ec0d1bd9e8 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -954,10 +954,12 @@ llvm::Triple ToolChain::getTripleWithoutOSVersion() const {
std::optional<std::string>
ToolChain::getTargetSubDirPath(StringRef BaseDir) const {
+ dbgs() << "getTargetSubDirPath: " << BaseDir << "\n";
auto getPathForTriple =
[&](const llvm::Triple &Triple) -> std::optional<std::string> {
SmallString<128> P(BaseDir);
llvm::sys::path::append(P, Triple.str());
+ dbgs() << "getTargetSubDirPath: " << P << "\n";
if (getVFS().exists(P))
return std::string(P);
return {};
@@ -1032,7 +1034,13 @@ std::optional<std::string> ToolChain::getRuntimePath() const {
std::optional<std::string> ToolChain::getStdlibPath() const {
SmallString<128> P(D.Dir);
+ if (Triple.isOSDarwin())
+ dbgs() << "getStdlibPath(): " << P << "\n";
llvm::sys::path::append(P, "..", "lib");
+ // Darwin does not use per-target runtime directory.
+ if (Triple.isOSDarwin())
+ return std::string(P);
+ dbgs() << "getStdlibPath(): " << P << "\n";
return getTargetSubDirPath(P);
}
@@ -1551,9 +1559,11 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
void ToolChain::AddFilePathLibArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {
- for (const auto &LibPath : getFilePaths())
+ for (const auto &LibPath : getFilePaths()) {
+ llvm::dbgs() << "LibPath: " << LibPath << "\n";
if(LibPath.length() > 0)
CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
+ }
}
void ToolChain::AddCCKextLibArgs(const ArgList &Args,
>From fcbd4740b011b1ef7402201ea20ae726f8cf71ee Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 14 Oct 2025 14:59:18 -0700
Subject: [PATCH 07/19] Update debug
---
.github/workflows/release-binaries.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 9884027af5dc7..25acfc9ebe52d 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -247,6 +247,7 @@ jobs:
echo "int main(int argc, char** argv) { return 0; }" >> test.cpp
${{ steps.setup-stage.outputs.build-prefix }}/build/bin/clang++ -### -fuse-ld=lld -stdlib=libc++ -Wl,--verbose test.cpp
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build/lib/*
+ ${{ steps.setup-stage.outputs.build-prefix }}/build/bin/clang++ -fuse-ld=lld -stdlib=libc++ -Wl,--verbose test.cpp
- uses: actions/upload-artifact at ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
>From 9b5d6cae0a45076034610ab6ac0198a38bcbda7a Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 14 Oct 2025 17:38:31 -0700
Subject: [PATCH 08/19] Disable IOS
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 25acfc9ebe52d..df809000dad12 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -135,7 +135,7 @@ jobs:
# add extra CMake args to disable them.
# See https://github.com/llvm/llvm-project/issues/99767
if [ "$RUNNER_OS" = "macOS" ]; then
- target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
+ target_cmake_flags="$target_cmake_flags -DCOMPILER_RT_ENABLE_IOS=OFF -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
if [ "$RUNNER_ARCH" = "ARM64" ]; then
arches=arm64
else
>From 2cc4f3a7bc47d12722e07c8214def6df4c98e741 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Oct 2025 11:04:53 -0700
Subject: [PATCH 09/19] Disable local runtimes
---
clang/cmake/caches/Release.cmake | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index a523cc561b3f9..c0feecfda1cd4 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -44,6 +44,16 @@ set(LLVM_RELEASE_ENABLE_LTO THIN CACHE STRING "")
set(LLVM_RELEASE_ENABLE_PGO ON CACHE BOOL "")
set(LLVM_RELEASE_ENABLE_RUNTIMES ${DEFAULT_RUNTIMES} CACHE STRING "")
set(LLVM_RELEASE_ENABLE_PROJECTS ${DEFAULT_PROJECTS} CACHE STRING "")
+
+if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
+ # Don't link against the just built runtimes due to:
+ # https://github.com/llvm/llvm-project/issues/77653
+ set(DEFAULT_LINK_LOCAL_RUNTIMES OFF)
+else()
+ set(DEFAULT_LINK_LOCAL_RUNTIMES ON)
+endif()
+set(LLVM_RELEASE_LINK_LOCAL_RUNTIMES ${DEFAULT_LINK_LOCAL_RUNTIMES} CACHE BOOL "")
+
# Note we don't need to add install here, since it is one of the pre-defined
# steps.
set(LLVM_RELEASE_FINAL_STAGE_TARGETS "clang;package;check-all;check-llvm;check-clang" CACHE STRING "")
@@ -55,8 +65,12 @@ set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
set(STAGE1_PROJECTS "clang")
+# Need to build compiler-rt in order to use PGO for later stages.
+set(STAGE1_RUNTIMES "compiler-rt")
# Build all runtimes so we can statically link them into the stage2 compiler.
-set(STAGE1_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind")
+if(DEFAULT_LINK_LOCAL_RUNTIMES)
+ list(APPEND STAGE1_RUNTIMES "libcxx;libcxxabi;libunwind")
+endif()
if (LLVM_RELEASE_ENABLE_PGO)
list(APPEND STAGE1_PROJECTS "lld")
@@ -118,11 +132,13 @@ set_instrument_and_final_stage_var(LLVM_ENABLE_LTO "${LLVM_RELEASE_ENABLE_LTO}"
if (LLVM_RELEASE_ENABLE_LTO)
set_instrument_and_final_stage_var(LLVM_ENABLE_LLD "ON" BOOL)
endif()
-set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL)
-set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL)
-set(RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind")
-if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
- set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc")
+if(DEFAULT_LINK_LOCAL_RUNTIMES)
+ set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL)
+ set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL)
+ set(RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind")
+ if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
+ set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc")
+ endif()
endif()
# Set flags for bolt
>From 5ce50f1e65098db2705829304145dcfc6bea10c4 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Oct 2025 11:14:28 -0700
Subject: [PATCH 10/19] Fix
---
clang/cmake/caches/Release.cmake | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index c0feecfda1cd4..c891caaacda67 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -146,9 +146,11 @@ if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -Wl,--emit-relocs,-znow")
endif()
-set_instrument_and_final_stage_var(CMAKE_EXE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
-set_instrument_and_final_stage_var(CMAKE_SHARED_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
-set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
+if (RELEASE_LINKER_FLAGS)
+ set_instrument_and_final_stage_var(CMAKE_EXE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
+ set_instrument_and_final_stage_var(CMAKE_SHARED_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
+ set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
+endif()
# Final Stage Config (stage2)
set_final_stage_var(LLVM_ENABLE_RUNTIMES "${LLVM_RELEASE_ENABLE_RUNTIMES}" STRING)
>From 72aff355892f3e98fd819866288db920993bf5f4 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Oct 2025 14:36:24 -0700
Subject: [PATCH 11/19] Revert "Fix/Debug"
This reverts commit 6d91fcd5583670d5045985976903854fdd68bb88.
---
clang/lib/Driver/ToolChain.cpp | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index ac5ec0d1bd9e8..3d5cac62afe01 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -954,12 +954,10 @@ llvm::Triple ToolChain::getTripleWithoutOSVersion() const {
std::optional<std::string>
ToolChain::getTargetSubDirPath(StringRef BaseDir) const {
- dbgs() << "getTargetSubDirPath: " << BaseDir << "\n";
auto getPathForTriple =
[&](const llvm::Triple &Triple) -> std::optional<std::string> {
SmallString<128> P(BaseDir);
llvm::sys::path::append(P, Triple.str());
- dbgs() << "getTargetSubDirPath: " << P << "\n";
if (getVFS().exists(P))
return std::string(P);
return {};
@@ -1034,13 +1032,7 @@ std::optional<std::string> ToolChain::getRuntimePath() const {
std::optional<std::string> ToolChain::getStdlibPath() const {
SmallString<128> P(D.Dir);
- if (Triple.isOSDarwin())
- dbgs() << "getStdlibPath(): " << P << "\n";
llvm::sys::path::append(P, "..", "lib");
- // Darwin does not use per-target runtime directory.
- if (Triple.isOSDarwin())
- return std::string(P);
- dbgs() << "getStdlibPath(): " << P << "\n";
return getTargetSubDirPath(P);
}
@@ -1559,11 +1551,9 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
void ToolChain::AddFilePathLibArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {
- for (const auto &LibPath : getFilePaths()) {
- llvm::dbgs() << "LibPath: " << LibPath << "\n";
+ for (const auto &LibPath : getFilePaths())
if(LibPath.length() > 0)
CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
- }
}
void ToolChain::AddCCKextLibArgs(const ArgList &Args,
>From dfc3419d0a267113965335406d42ebb094bbf26e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Oct 2025 14:37:09 -0700
Subject: [PATCH 12/19] Revert "Fix build failure"
This reverts commit a0bb37c324b6dcaff28aff35bf39e2ebbf879bb7.
---
clang/lib/Driver/ToolChains/Darwin.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index 2c869d260211d..7e2d62a6bfc94 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -669,7 +669,7 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
// Add local file paths to ensure the toolchain's libc++ is used instead of
// the system's.
- getToolChain().AddFilePathLibArgs(Args, CmdArgs);
+ ToolChain.AddFilePathLibArgs(Args, CmdArgs);
// Forward -ObjC when either -ObjC or -ObjC++ is used, to force loading
// members of static archive libraries which implement Objective-C classes or
>From 165a856d16be5a5eccdd3042104b9da0b80fd7d3 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Oct 2025 14:37:41 -0700
Subject: [PATCH 13/19] Revert "[Darwin][Driver] Prefer linking with
toolchain's libc++ instead of system"
This reverts commit b2f00eb013f5174b1ab5199bb7cc4cab6d5ed059.
---
clang/lib/Driver/ToolChains/Darwin.cpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index 7e2d62a6bfc94..d2356ebdfa86c 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -667,10 +667,6 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
Args.addAllArgs(CmdArgs, {options::OPT_d_Flag, options::OPT_s, options::OPT_t,
options::OPT_Z_Flag, options::OPT_u_Group});
- // Add local file paths to ensure the toolchain's libc++ is used instead of
- // the system's.
- ToolChain.AddFilePathLibArgs(Args, CmdArgs);
-
// Forward -ObjC when either -ObjC or -ObjC++ is used, to force loading
// members of static archive libraries which implement Objective-C classes or
// categories.
>From 8f3dc34a3767df75ae8b297bfbce61de9b03a3ce Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Oct 2025 14:41:55 -0700
Subject: [PATCH 14/19] Fixes
---
.github/workflows/release-binaries.yml | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index df809000dad12..77f250a901aa7 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -240,15 +240,6 @@ jobs:
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
- - name: Debug
- shell: bash
- if: always()
- run: |
- echo "int main(int argc, char** argv) { return 0; }" >> test.cpp
- ${{ steps.setup-stage.outputs.build-prefix }}/build/bin/clang++ -### -fuse-ld=lld -stdlib=libc++ -Wl,--verbose test.cpp
- ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build/lib/*
- ${{ steps.setup-stage.outputs.build-prefix }}/build/bin/clang++ -fuse-ld=lld -stdlib=libc++ -Wl,--verbose test.cpp
-
- uses: actions/upload-artifact at ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-release-binary
>From 34884af5df5a2decc525174ea08e42ff6ba89458 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 16 Oct 2025 17:24:46 -0700
Subject: [PATCH 15/19] Revert "Disable IOS"
This reverts commit 9b5d6cae0a45076034610ab6ac0198a38bcbda7a.
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 77f250a901aa7..dda6f8b694803 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -135,7 +135,7 @@ jobs:
# add extra CMake args to disable them.
# See https://github.com/llvm/llvm-project/issues/99767
if [ "$RUNNER_OS" = "macOS" ]; then
- target_cmake_flags="$target_cmake_flags -DCOMPILER_RT_ENABLE_IOS=OFF -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
+ target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
if [ "$RUNNER_ARCH" = "ARM64" ]; then
arches=arm64
else
>From c57dc7b78a9096f3d2c328c6da981d88ce7a09bb Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 16 Oct 2025 17:29:37 -0700
Subject: [PATCH 16/19] Disable LTO for pull requests
---
.github/workflows/release-binaries.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index dda6f8b694803..3ff5a8719a71e 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -156,8 +156,6 @@ jobs:
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
fi
- echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
- echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*)
build_runs_on="depot-${{ inputs.runs-on }}-16"
@@ -166,6 +164,7 @@ jobs:
macos-13)
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
build_runs_on="${{ inputs.runs-on }}"
+ target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
else
build_runs_on="macos-13-large"
fi
@@ -174,6 +173,7 @@ jobs:
macos-14)
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
build_runs_on="${{ inputs.runs-on }}"
+ target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
else
build_runs_on="depot-macos-14"
fi
@@ -184,6 +184,8 @@ jobs:
build_runs_on=$test_runs_on
;;
esac
+ echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
+ echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
echo "build-runs-on=$build_runs_on" >> $GITHUB_OUTPUT
echo "test-runs-on=$test_runs_on" >> $GITHUB_OUTPUT
>From 89ed7243eb3eaffe1e898aa5da0c8da4a1a9a9e9 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 17 Oct 2025 08:13:44 -0700
Subject: [PATCH 17/19] Remove parallel link job limit
---
.github/workflows/release-binaries.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 3ff5a8719a71e..4f900e9bca5a4 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -232,7 +232,6 @@ jobs:
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
- -DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build
>From 679c693d354fcadd1bc3fea238a0b6a2ed612092 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 17 Oct 2025 15:59:35 -0700
Subject: [PATCH 18/19] Disable pgo
---
.github/workflows/release-binaries.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 4f900e9bca5a4..9a7e449d40f0d 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -164,7 +164,7 @@ jobs:
macos-13)
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
build_runs_on="${{ inputs.runs-on }}"
- target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
+ target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF -DLLVM_RELEASE_ENABLE_PGO=OFF
else
build_runs_on="macos-13-large"
fi
@@ -173,7 +173,7 @@ jobs:
macos-14)
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
build_runs_on="${{ inputs.runs-on }}"
- target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
+ target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF -DLLVM_RELEASE_ENABLE_PGO=OFF"
else
build_runs_on="depot-macos-14"
fi
>From 5dd5f270421f32eb37f8153a82a5c147e66c4c53 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 17 Oct 2025 16:07:23 -0700
Subject: [PATCH 19/19] Disable pgo
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 9a7e449d40f0d..ddca657ff6aff 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -164,7 +164,7 @@ jobs:
macos-13)
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
build_runs_on="${{ inputs.runs-on }}"
- target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF -DLLVM_RELEASE_ENABLE_PGO=OFF
+ target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF -DLLVM_RELEASE_ENABLE_PGO=OFF"
else
build_runs_on="macos-13-large"
fi
More information about the cfe-commits
mailing list