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 2828# Build cg_clif
2929unset CARGO_TARGET_DIR
3030export 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
3141if [[ " $CHANNEL " == " release" ]]; then
3242 cargo build --release
3343else
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ if [[ $(uname) == 'Darwin' ]]; then
5353 export RUSTFLAGS=" $RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
5454fi
5555
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"
5757export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
5858
5959export CG_CLIF_DISPLAY_CG_TIME=1
You can’t perform that action at this time.
0 commit comments