Skip to content

Commit

Permalink
add rpath in build.rs because cargo didn't pass crate's args to c…
Browse files Browse the repository at this point in the history
…urrent project. According to `https://github.com/rust-lang/cargo/issues/5077`

Signed-off-by: HouXiaoxuan <Hou_Xiaoxuan@163.com>
  • Loading branch information
Hou-Xiaoxuan committed Jul 4, 2024
1 parent eea221e commit ca23bd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mega/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
//!
fn main() -> shadow_rs::SdResult<()> {
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
shadow_rs::new()
}

0 comments on commit ca23bd6

Please sign in to comment.