Skip to content

Commit

Permalink
Try old school
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker committed Sep 9, 2024
1 parent 3c56f87 commit 5e7fa7c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,20 @@ jobs:
components: rustfmt, llvm-tools-preview
rustflags: ""
cache-workspaces: "./libs -> ./target"
- name: Install linker
- name: Install linker (Windows)
if: ${{ matrix.os == 'windows-2022' }}
uses: taiki-e/install-action@v2
with:
tool: cargo-binutils
- name: Install linker (Linux)
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo apt-get update
sudo apt-get install lld clang
- name: Install linker (MacOS)
if: ${{ matrix.os == 'macos-12' || matrix.os == 'macos-14' }}
run: |
brew install llvm
- name: Download pavex CLI artifact
uses: actions/download-artifact@v4
with:
Expand Down
23 changes: 14 additions & 9 deletions libs/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# To install it:
# On Windows
# ```
# cargo install cargo-binutils
# cargo install -f cargo-binutils
# rustup component add llvm-tools-preview
# ```
[target.x86_64-pc-windows-msvc]
linker = "rust-lld"
# ```[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.x86_64-pc-windows-gnu]
linker = "rust-lld"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]

# On Linux:
# - Ubuntu, `sudo apt-get install lld clang`
# - Arch, `sudo pacman -S lld clang`
[target.x86_64-unknown-linux-gnu]
linker = "rust-lld"
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]

# On MacOS, `brew install llvm` and follow steps in `brew info llvm`
[target.x86_64-apple-darwin]
linker = "rust-lld"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.aarch64-apple-darwin]
linker = "rust-lld"
rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld"]

0 comments on commit 5e7fa7c

Please sign in to comment.