diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-08-04 14:18:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 14:18:12 +0000 |
commit | 510241689fb8b2acdf4e2cc13edbd32deb2252aa (patch) | |
tree | 1b8c3929592e2f5497f5a587f73aec3d8402ea2f | |
parent | c6fa15c94f4de559c6e2303e0bd56b293036fd7c (diff) | |
parent | 70923d4d28346f56aa2b4ae67930193042bfef1d (diff) | |
download | rust-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.rs | 2 |
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"); }; } |