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 11fn main ( ) {
2+ println ! ( "cargo:rerun-if-env-changed=CUSTOM_LIBFUZZER_PATH" ) ;
23 if let Ok ( custom) = :: std:: env:: var ( "CUSTOM_LIBFUZZER_PATH" ) {
4+ println ! ( "cargo:rerun-if-changed={custom}" ) ;
5+
36 let custom_lib_path = :: std:: path:: PathBuf :: from ( & custom) ;
47 let custom_lib_dir = custom_lib_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) ;
58
69 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 ( ) ) ;
813
914 println ! ( "cargo:rustc-link-search=native={}" , custom_lib_dir) ;
1015 println ! ( "cargo:rustc-link-lib=static={}" , custom_lib_name) ;
You can’t perform that action at this time.
0 commit comments