File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1004,10 +1004,19 @@ fn envify(name: &str) -> String {
10041004
10051005/// System libraries should only be linked dynamically
10061006fn is_static_available ( name : & str , system_roots : & [ PathBuf ] , dirs : & [ PathBuf ] ) -> bool {
1007- let libname = format ! ( "lib{}.a" , name) ;
1007+ let libnames = {
1008+ let mut names = vec ! [ format!( "lib{}.a" , name) ] ;
1009+
1010+ if cfg ! ( target_os = "windows" ) {
1011+ names. push ( format ! ( "{}.lib" , name) ) ;
1012+ }
1013+
1014+ names
1015+ } ;
10081016
10091017 dirs. iter ( ) . any ( |dir| {
1010- !system_roots. iter ( ) . any ( |sys| dir. starts_with ( sys) ) && dir. join ( & libname) . exists ( )
1018+ let library_exists = libnames. iter ( ) . any ( |libname| dir. join ( & libname) . exists ( ) ) ;
1019+ library_exists && !system_roots. iter ( ) . any ( |sys| dir. starts_with ( sys) )
10111020 } )
10121021}
10131022
You can’t perform that action at this time.
0 commit comments