Skip to content
Merged
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
32 changes: 32 additions & 0 deletions projects/fermyon.com/spin/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ build:
- ln -sf $HOME/.rustup/toolchains/*/bin/* .
working-directory: $HOME/.cargo/bin

# rust 1.98.0 switched darwin's rust-lld/rust-objcopy from a statically linked
# LLVM to `@rpath/libLLVM.dylib`, but their only rpath is `@loader_path/../lib`
# -- ie lib/rustlib/<target>/lib -- and no component ships the dylib there; it
# lives at <toolchain>/lib/libLLVM.dylib. so every wasm32 link, which is what
# rust-lld is *for*, dies with `Library not loaded: @rpath/libLLVM.dylib`.
# linux is unaffected: there RUNPATH is `$ORIGIN/../../../:$ORIGIN/../lib`,
# ie it keeps the entry darwin lost. cf. rust-lang/rust#53813 and #76921.
- run: |
for bin in $HOME/.rustup/toolchains/*/lib/rustlib/*/bin; do
test -f "$bin/rust-lld" || continue
test -f "$bin/../../../libLLVM.dylib" || continue
mkdir -p "$bin/../lib"
ln -sf ../../../libLLVM.dylib "$bin/../lib/libLLVM.dylib"
done
if: darwin

- cargo install --locked --path . --root {{prefix}}
env:
PATH: $HOME/.cargo/bin:$PATH
Expand Down Expand Up @@ -57,6 +73,22 @@ test:
- ln -sf $HOME/.rustup/toolchains/*/bin/* .
working-directory: $HOME/.cargo/bin

# rust 1.98.0 switched darwin's rust-lld/rust-objcopy from a statically linked
# LLVM to `@rpath/libLLVM.dylib`, but their only rpath is `@loader_path/../lib`
# -- ie lib/rustlib/<target>/lib -- and no component ships the dylib there; it
# lives at <toolchain>/lib/libLLVM.dylib. so every wasm32 link, which is what
# rust-lld is *for*, dies with `Library not loaded: @rpath/libLLVM.dylib`.
# linux is unaffected: there RUNPATH is `$ORIGIN/../../../:$ORIGIN/../lib`,
# ie it keeps the entry darwin lost. cf. rust-lang/rust#53813 and #76921.
- run: |
for bin in $HOME/.rustup/toolchains/*/lib/rustlib/*/bin; do
test -f "$bin/rust-lld" || continue
test -f "$bin/../../../libLLVM.dylib" || continue
mkdir -p "$bin/../lib"
ln -sf ../../../libLLVM.dylib "$bin/../lib/libLLVM.dylib"
done
if: darwin

- run: spin build
working-directory: hello-rust
env:
Expand Down