Skip to content

Commit c959dd3

Browse files
committed
fix(native): avoid absolute macOS library install names
1 parent db110f7 commit c959dd3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
fn main() {
22
napi_build::setup();
3+
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("macos") {
4+
// The linker otherwise embeds its absolute output path as the install name.
5+
println!("cargo:rustc-link-arg-cdylib=-Wl,-install_name,@rpath/unix.node");
6+
}
37
}

0 commit comments

Comments
 (0)