File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,11 @@ pub fn main() {
53
53
let rustup_tc = env:: var ( "RUSTUP_TOOLCHAIN" ) . unwrap ( ) ;
54
54
let rustup_lib = path_str ! ( [ & rustup_home, "toolchains" , & rustup_tc, "lib" ] ) ;
55
55
println ! ( "cargo:rustc-link-arg-bin=kani-compiler=-Wl,-rpath,{}" , rustup_lib) ;
56
+
56
57
// While we hard-code the above for development purposes, for a release/install we look
57
58
// in a relative location for a symlink to the local rust toolchain
58
- println ! ( "cargo:rustc-link-arg-bin=kani-compiler=-Wl,-rpath,$ORIGIN/../toolchain/lib" ) ;
59
+ let origin = if cfg ! ( target_os = "macos" ) { "@loader_path" } else { "$ORIGIN" } ;
60
+ println ! ( "cargo:rustc-link-arg-bin=kani-compiler=-Wl,-rpath,{}/../toolchain/lib" , origin) ;
59
61
60
62
// Compile kani library and export KANI_LIB_PATH variable with its relative location.
61
63
let out_dir = env:: var ( "OUT_DIR" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments