xonecas.io
8447
Co

conveyor / commit 0654270

One path per rpath, and @loader_path on macOS

Co-Authored-By: Claude Opus 5.5

sacenox2026-11-13 0654270a893e605307cb6e670c702c8f3dcabf89 parent ed93980

1 file changed

crates/conveyor-app/build.rs+3−1
@@ -8,5 +8,7 @@ fn main() {
88 let out = std::process::Command::new(rustc).args(["--print", "sysroot"]).output().unwrap();
99 let sysroot = String::from_utf8(out.stdout).unwrap();
1010 let target = std::env::var("TARGET").unwrap();
11- println!("cargo:rustc-link-arg-bins=-Wl,-rpath,$ORIGIN:{}/lib/rustlib/{target}/lib", sysroot.trim());
11+ // One path per -rpath: macOS's linker doesn't split on colons.
12+ println!("cargo:rustc-link-arg-bins=-Wl,-rpath,{}", if target.contains("apple") { "@loader_path" } else { "$ORIGIN" });
13+ println!("cargo:rustc-link-arg-bins=-Wl,-rpath,{}/lib/rustlib/{target}/lib", sysroot.trim());
1214 }