File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
fn main ( ) {
2
+ println ! ( "cargo:rerun-if-env-changed=CUSTOM_LIBFUZZER_PATH" ) ;
2
3
if let Ok ( custom) = :: std:: env:: var ( "CUSTOM_LIBFUZZER_PATH" ) {
4
+ println ! ( "cargo:rerun-if-changed={custom}" ) ;
5
+
3
6
let custom_lib_path = :: std:: path:: PathBuf :: from ( & custom) ;
4
7
let custom_lib_dir = custom_lib_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) ;
5
8
6
9
let custom_lib_name = custom_lib_path. file_stem ( ) . unwrap ( ) . to_string_lossy ( ) ;
7
- 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 ( ) ) ;
8
13
9
14
println ! ( "cargo:rustc-link-search=native={}" , custom_lib_dir) ;
10
15
println ! ( "cargo:rustc-link-lib=static={}" , custom_lib_name) ;
You can’t perform that action at this time.
0 commit comments