File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 28
28
# Build cg_clif
29
29
unset CARGO_TARGET_DIR
30
30
export RUSTFLAGS=" -Zrun_dsymutil=no"
31
+ unamestr=$( uname)
32
+ if [[ " $unamestr " == ' Linux' ]]; then
33
+ export RUSTFLAGS=' -Clink-arg=-Wl,-rpath=$ORIGIN/../lib ' $RUSTFLAGS
34
+ elif [[ " $unamestr " == ' Darwin' ]]; then
35
+ export RUSTFLAGS=' -Clink-arg=-Wl,-rpath,@loader_path/../lib -Zosx-rpath-install-name ' $RUSTFLAGS
36
+ dylib_ext=' dylib'
37
+ else
38
+ echo " Unsupported os"
39
+ exit 1
40
+ fi
31
41
if [[ " $CHANNEL " == " release" ]]; then
32
42
cargo build --release
33
43
else
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ if [[ $(uname) == 'Darwin' ]]; then
53
53
export RUSTFLAGS=" $RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
54
54
fi
55
55
56
- export LD_LIBRARY_PATH=" $dir /lib: $ ( rustc --print sysroot) /lib:$dir /target/out:$dir /sysroot/lib/rustlib/$TARGET_TRIPLE /lib"
56
+ export LD_LIBRARY_PATH=" $( rustc --print sysroot) /lib:$dir /target/out:$dir /sysroot/lib/rustlib/$TARGET_TRIPLE /lib"
57
57
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
58
58
59
59
export CG_CLIF_DISPLAY_CG_TIME=1
You can’t perform that action at this time.
0 commit comments