Skip to content

Commit cd3c5a8

Browse files
committed
Simplify linking now that we have a monolib
1 parent 0f73f7f commit cd3c5a8

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

libbitcoinkernel-sys/build.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,7 @@ fn main() {
7070
};
7171
println!("cargo:rustc-link-search=native={}", lib_dir.display());
7272

73-
// Link all static libraries found in the install directory
74-
for entry in std::fs::read_dir(&lib_dir).expect("Library directory has to be readable") {
75-
let path = entry.unwrap().path();
76-
if path
77-
.extension()
78-
.is_some_and(|extension| extension == "a" || extension == "lib")
79-
{
80-
if let Some(name) = path.file_stem().and_then(|n| n.to_str()) {
81-
// Special case for libsecp256k1 on Windows
82-
let lib_name = if name == "libsecp256k1" && cfg!(target_env = "msvc") {
83-
"libsecp256k1" // Use full name
84-
} else {
85-
name.strip_prefix("lib").unwrap_or(name) // Strip lib prefix for others
86-
};
87-
println!("cargo:rustc-link-lib=static={lib_name}");
88-
}
89-
}
90-
}
73+
println!("cargo:rustc-link-lib=static=bitcoinkernel");
9174

9275
// Header path for bindgen
9376
let include_path = install_dir.join("include");

0 commit comments

Comments
 (0)