[llvm] workflows/release-binaries: Build gold plugin on Linux (PR #140391)
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Sat May 17 11:43:45 PDT 2025
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/140391
>From e082197eb0c804788c88342015d9ebfd4a551891 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 17 May 2025 18:04:33 +0000
Subject: [PATCH 1/2] workflows/release-binaries: Build gold plugin on Linux
Fixes #132168
---
.github/workflows/release-binaries.yml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index c113b42dc8ed4..a8c723a520482 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -156,6 +156,10 @@ jobs:
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
fi
+ if [ "$RUNNER_OS" = "Linux" ]; then
+ target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_LLVM_BINUTILS_INCDIR=/usr/include"
+ fi
+
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
@@ -235,6 +239,13 @@ jobs:
env:
CCACHE_BIN: ${{ needs.prepare.outputs.ccache }}
run: |
+ # Install binutils-dev on linux so we can build the gold plugin. Clang
+ # defaults to binutils on Linux, so we need the plugin so that users can
+ # enable lto while using the default linker.
+ if [ "$RUNNER_OS" = "Linux" ]; then
+ apt-get install binutils-dev
+ fi
+
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
# so we need to set some extra cmake flags to disable this.
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
>From 892fe0d7cc91a788808147afa14cafa1f1d572e7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 17 May 2025 18:42:18 +0000
Subject: [PATCH 2/2] Fix binutils install
---
.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 a8c723a520482..138843006a9ca 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -243,7 +243,7 @@ jobs:
# defaults to binutils on Linux, so we need the plugin so that users can
# enable lto while using the default linker.
if [ "$RUNNER_OS" = "Linux" ]; then
- apt-get install binutils-dev
+ sudo apt-get install binutils-dev
fi
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
More information about the llvm-commits
mailing list