Skip to content

Commit

Permalink
Merge pull request #14 from TheLostLambda/fix-macos-ci
Browse files Browse the repository at this point in the history
ci(macos): fix linker error
  • Loading branch information
TheLostLambda authored Nov 11, 2024
2 parents 64b8133 + 800f7e1 commit 163f329
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
[target.aarch64-apple-darwin]
linker = "rust-lld"
# NOTE: `rustdoc` doesn't currently respect the `linker` setting — keep an eye
# on this issue: https://github.com/rust-lang/rust/issues/125657
rustdocflags = ["-Clink-arg=-fuse-ld=lld"]

# NOTE: Also annoyingly, `target.<cfg>` doesn't let you set `rustdocflags`, so
# something like `[target.'cfg(target_os = "macos")']` doesn't work here and
# this repetition is needed...
[target.x86_64-apple-darwin]
linker = "rust-lld"
rustdocflags = ["-Clink-arg=-fuse-ld=lld"]
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v4
Expand All @@ -26,6 +26,13 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}

# NOTE: `rustdoc` doesn't currently respect the `linker` setting — keep
# an eye on this issue: https://github.com/rust-lang/rust/issues/125657.
# In the meantime, we can't use `rust-lld` and will need to manually
# install `lld` on macOS (#14)
- if: runner.os == 'macOS'
run: brew install lld

- run: just test

check_wasm_build:
Expand Down

0 comments on commit 163f329

Please sign in to comment.