Skip to content

Commit ca23bd6

Browse files
committed
add rpath in build.rs because cargo didn't pass crate's args to current project. According to https://github.com/rust-lang/cargo/issues/5077`
Signed-off-by: HouXiaoxuan <[email protected]>
1 parent eea221e commit ca23bd6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mega/src/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
//!
55
66
fn main() -> shadow_rs::SdResult<()> {
7+
#[cfg(target_os = "linux")]
8+
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
9+
#[cfg(target_os = "macos")]
10+
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
711
shadow_rs::new()
812
}

0 commit comments

Comments
 (0)