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.
2 parents 55c8e0b + 663c0b6 commit 289f20fCopy full SHA for 289f20f
build.rs
@@ -1,10 +1,15 @@
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
+ println!("cargo:rerun-if-changed={custom}");
5
+
6
let custom_lib_path = ::std::path::PathBuf::from(&custom);
7
let custom_lib_dir = custom_lib_path.parent().unwrap().to_string_lossy();
8
9
let custom_lib_name = custom_lib_path.file_stem().unwrap().to_string_lossy();
- let custom_lib_name = custom_lib_name.trim_start_matches("lib");
10
+ let custom_lib_name = custom_lib_name
11
+ .strip_prefix("lib")
12
+ .unwrap_or(custom_lib_name.as_ref());
13
14
println!("cargo:rustc-link-search=native={}", custom_lib_dir);
15
println!("cargo:rustc-link-lib=static={}", custom_lib_name);
0 commit comments