We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55c8e0b commit 7a7f78dCopy full SHA for 7a7f78d
build.rs
@@ -1,10 +1,11 @@
1
fn main() {
2
+ println!("cargo:rerun-if-env-changed=CUSTOM_LIBFUZZER_PATH");
3
if let Ok(custom) = ::std::env::var("CUSTOM_LIBFUZZER_PATH") {
4
let custom_lib_path = ::std::path::PathBuf::from(&custom);
5
let custom_lib_dir = custom_lib_path.parent().unwrap().to_string_lossy();
6
7
let custom_lib_name = custom_lib_path.file_stem().unwrap().to_string_lossy();
- let custom_lib_name = custom_lib_name.trim_start_matches("lib");
8
+ let custom_lib_name = custom_lib_name.strip_prefix("lib").unwrap_or(custom_lib_name.as_ref());
9
10
println!("cargo:rustc-link-search=native={}", custom_lib_dir);
11
println!("cargo:rustc-link-lib=static={}", custom_lib_name);
0 commit comments