File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/librustc_codegen_ssa/back Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1008,14 +1008,13 @@ fn get_crt_libs_path(sess: &Session) -> Option<PathBuf> {
10081008 path. pop ( ) ;
10091009 path. pop ( ) ;
10101010 // Based on Clang MinGW driver
1011- let probe_path = path. join ( & mingw_dir) . join ( "lib" ) ;
1012- if probe_path. exists ( ) {
1013- return Some ( probe_path) ;
1014- } ;
1015- let probe_path = path. join ( & mingw_dir) . join ( "sys-root/mingw/lib" ) ;
1016- if probe_path. exists ( ) {
1017- return Some ( probe_path) ;
1018- } ;
1011+ let probe_paths = vec ! [ "lib" , "sys-root/mingw/lib" ] ;
1012+ for probe_path in probe_paths {
1013+ let probe_path = path. join ( & mingw_dir) . join ( & probe_path) ;
1014+ if probe_path. join ( "crt2.o" ) . exists ( ) {
1015+ return Some ( probe_path) ;
1016+ } ;
1017+ }
10191018 } ;
10201019 } ;
10211020 None
You can’t perform that action at this time.
0 commit comments