diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index c113b42dc8ed4..138843006a9ca 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 + sudo 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 \