[llvm] workflows/release-binaries: Build gold plugin on Linux (PR #140391)

via llvm-commits llvm-commits at lists.llvm.org
Sat May 17 11:29:21 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

<details>
<summary>Changes</summary>

Fixes #<!-- -->132168

---
Full diff: https://github.com/llvm/llvm-project/pull/140391.diff


1 Files Affected:

- (modified) .github/workflows/release-binaries.yml (+11) 


``````````diff
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 \

``````````

</details>


https://github.com/llvm/llvm-project/pull/140391


More information about the llvm-commits mailing list