File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1981,10 +1981,19 @@ impl Build {
19811981 . replace ( "thumbv7" , "arm" ) ;
19821982 let gnu_compiler = format ! ( "{}-{}" , target, gnu) ;
19831983 let clang_compiler = format ! ( "{}-{}" , target, clang) ;
1984+ // On Windows, the Android clang compiler is provided as a `.cmd` file instead
1985+ // of a `.exe` file. `std::process::Command` won't run `.cmd` files unless the
1986+ // `.cmd` is explicitly appended to the command name, so we do that here.
1987+ let clang_compiler_cmd = format ! ( "{}-{}.cmd" , target, clang) ;
1988+
19841989 // Check if gnu compiler is present
19851990 // if not, use clang
19861991 if Command :: new ( & gnu_compiler) . spawn ( ) . is_ok ( ) {
19871992 gnu_compiler
1993+ } else if host. contains ( "windows" )
1994+ && Command :: new ( & clang_compiler) . spawn ( ) . is_err ( )
1995+ {
1996+ clang_compiler_cmd
19881997 } else {
19891998 clang_compiler
19901999 }
You can’t perform that action at this time.
0 commit comments