Skip to content
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

ci(macos): fix linker error #14

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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