File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1981,10 +1981,19 @@ impl Build {
1981
1981
. replace ( "thumbv7" , "arm" ) ;
1982
1982
let gnu_compiler = format ! ( "{}-{}" , target, gnu) ;
1983
1983
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
+
1984
1989
// Check if gnu compiler is present
1985
1990
// if not, use clang
1986
1991
if Command :: new ( & gnu_compiler) . spawn ( ) . is_ok ( ) {
1987
1992
gnu_compiler
1993
+ } else if host. contains ( "windows" )
1994
+ && Command :: new ( & clang_compiler) . spawn ( ) . is_err ( )
1995
+ {
1996
+ clang_compiler_cmd
1988
1997
} else {
1989
1998
clang_compiler
1990
1999
}
You can’t perform that action at this time.
0 commit comments