Skip to content

Commit 1a836c2

Browse files
authored
support soname for macos (#8)
1 parent 0974d6f commit 1a836c2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
use std::env;
2+
13
fn main() {
2-
println!("cargo:rustc-cdylib-link-arg=-Wl,-soname,librbackend.abi3.so")
4+
let target = env::var("TARGET").unwrap();
5+
if target.contains("linux") {
6+
println!("cargo:rustc-cdylib-link-arg=-Wl,-soname,librbackend.abi3.so")
7+
}
8+
if target.contains("apple") {
9+
println!("cargo:rustc-cdylib-link-arg=-Wl,-install_name,librbackend.abi3.so")
10+
}
311
}

0 commit comments

Comments
 (0)