Skip to content

Commit

Permalink
[build] fix lld linker path^3
Browse files Browse the repository at this point in the history
  • Loading branch information
fhanau committed Oct 10, 2024
1 parent 2e0fa0e commit 1b60a00
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ jobs:
if: runner.os == 'macOS'
run: |
sudo xcode-select -s "/Applications/Xcode_15.1.app"
# Install lld and link it to /usr/local/bin.
# Install lld and link it to /usr/local/bin. We overwrite any existing link, which may
# exist from an older pre-installed LLVM version on the runner image.
brew install lld
sudo ln -s $HOMEBREW_PREFIX/bin/ld64.lld /usr/local/bin/ld64.lld
sudo ln -s -f $HOMEBREW_PREFIX/bin/ld64.lld /usr/local/bin/ld64.lld
# Enable lld identical code folding to significantly reduce binary size.
echo "build:macos --config=macos_lld_icf" >> .bazelrc
- name: Setup Windows
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
os:
[
{ name : linux, image : ubuntu-20.04 },
{ name : macOS, image : macos-15 },
{ name : macOS, image : macos-13 },
{ name : windows, image : windows-2022 }
]
config:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
config: { suffix: -debug, bazel-args: --config=debug }
# due to resource constraints, exclude the macOS-debug runner for now. linux-debug and
# linux-asan should provide sufficient coverage for building in the debug configuration.
- os: { name : macOS, image : macos-15 }
- os: { name : macOS, image : macos-13 }
config: { suffix: -debug, bazel-args: --config=debug }
fail-fast: false
runs-on: ${{ matrix.os.image }}
Expand Down Expand Up @@ -103,16 +103,23 @@ jobs:
sed -i -e "s%llvm-symbolizer%/usr/lib/llvm-16/bin/llvm-symbolizer%" .bazelrc
- name: Setup macOS
if: matrix.os.name == 'macOS'
# TODO: We want to symbolize stacks for crashes on CI. Xcode is currently based on LLVM 17
# but the macos-15 image has llvm@18 installed:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
# TODO: We want to symbolize stacks for crashes on CI. Xcode is currently based on LLVM 16
# but the macos-13 image has llvm@15 installed:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
#
# Not enabled because symbolication does not work on workerd macOS builds yet and running
# llvm-symbolizer in the currently broken state causes some tests to time out on the
# runner.
run: |
# export LLVM_SYMBOLIZER=$(brew --prefix llvm@18)/bin/llvm-symbolizer
sudo xcode-select -s "/Applications/Xcode_15.1.app"
# export LLVM_SYMBOLIZER=$(brew --prefix llvm@15)/bin/llvm-symbolizer
# sed -i -e "s%llvm-symbolizer%${LLVM_SYMBOLIZER}%" .bazelrc
# Install lld and link it to /usr/local/bin. We overwrite any existing link, which may
# exist from an older pre-installed LLVM version on the runner image.
brew install lld
sudo ln -s -f $HOMEBREW_PREFIX/bin/ld64.lld /usr/local/bin/ld64.lld
# Enable lld identical code folding to significantly reduce binary size.
echo "build:macos --config=macos_lld_icf" >> .bazelrc
- name: Setup Windows
if: matrix.os.name == 'windows'
# Set a custom output root directory to avoid long file name issues.
Expand Down

0 comments on commit 1b60a00

Please sign in to comment.