-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: simplify rust activation (#2828)
- Loading branch information
1 parent
b6e4dbd
commit 698087b
Showing
3 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
export CARGO_TARGET_DIR="target/pixi" | ||
|
||
# Setup the mold linker when targeting x86_64-unknown-linux-gnu | ||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER="clang" | ||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-arg=-fuse-ld=$CONDA_PREFIX/bin/mold" | ||
|
||
# on macOS we need to set these rust flags | ||
# On macOS we need to set these rust flags to avoid the following error: | ||
# dyld[98511]: Library not loaded: @rpath/liblzma.5.dylib | ||
# Referenced from: <E86679E3-7383-3039-9E4A-031C60A071A5> .. | ||
# Reason: no LC_RPATH's found | ||
export CARGO_TARGET_X86_64_APPLE_DARWIN_RUSTFLAGS="-C link-arg=-Wl,-rpath,$CONDA_PREFIX/lib" | ||
export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUSTFLAGS="-C link-arg=-Wl,-rpath,$CONDA_PREFIX/lib" |