summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-08-04 14:18:12 +0000
committerGitHub <noreply@github.com>2021-08-04 14:18:12 +0000
commit510241689fb8b2acdf4e2cc13edbd32deb2252aa (patch)
tree1b8c3929592e2f5497f5a587f73aec3d8402ea2f
parentc6fa15c94f4de559c6e2303e0bd56b293036fd7c (diff)
parent70923d4d28346f56aa2b4ae67930193042bfef1d (diff)
downloadrust-libzfs-510241689fb8b2acdf4e2cc13edbd32deb2252aa.zip
Merge #66
66: Fix linking to libzutil on FreeBSD r=jmesmon a=asomers Rust needs to use -as-needed when linking to transitive dependencies. At least, on some targets. It's undocumented which targets require that. This option is not documented in the Cargo Book, only in the RFC Book: https://rust-lang.github.io/rfcs/2951-native-link-modifiers.html Fixes #65 Co-authored-by: Alan Somers <asomers@gmail.com>
-rw-r--r--zfs-core-sys/build.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/zfs-core-sys/build.rs b/zfs-core-sys/build.rs
index 4c08011..e745be2 100644
--- a/zfs-core-sys/build.rs
+++ b/zfs-core-sys/build.rs
@@ -9,6 +9,6 @@ fn main() {
println!("cargo:rustc-link-lib=nvpair");
if cfg!(target_os = "freebsd") {
- println!("cargo:rustc-link-lib=zutil");
+ println!("cargo:rustc-link-lib=dylib:-as-needed=zutil");
};
}