Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

workflows/release-binaries: Build gold plugin on Linux #140391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
Loading
from

Conversation

tstellar
Copy link
Collaborator

Fixes #132168

@llvmbot
Copy link
Member

llvmbot commented May 17, 2025

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

Fixes #132168


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

1 Files Affected:

  • (modified) .github/workflows/release-binaries.yml (+11)
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 \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LLVMgold.so is not included in LLVM-20.1.1-Linux-X64.tar.xz
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.