File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -860,11 +860,22 @@ impl Config {
860
860
} )
861
861
. or_else ( || {
862
862
if target. contains ( "emscripten" ) {
863
- if self . cpp {
864
- Some ( Tool :: new ( PathBuf :: from ( "em++" ) ) )
863
+ //Windows uses bat file so we have to be a bit more specific
864
+ let tool = if self . cpp {
865
+ if cfg ! ( windows) {
866
+ "em++.bat"
867
+ } else {
868
+ "em++"
869
+ }
865
870
} else {
866
- Some ( Tool :: new ( PathBuf :: from ( "emcc" ) ) )
867
- }
871
+ if cfg ! ( windows) {
872
+ "emcc.bat"
873
+ } else {
874
+ "emcc"
875
+ }
876
+ } ;
877
+
878
+ Some ( Tool :: new ( PathBuf :: from ( tool) ) )
868
879
} else {
869
880
None
870
881
}
@@ -992,7 +1003,14 @@ impl Config {
992
1003
if self . get_target ( ) . contains ( "android" ) {
993
1004
PathBuf :: from ( format ! ( "{}-ar" , self . get_target( ) . replace( "armv7" , "arm" ) ) )
994
1005
} else if self . get_target ( ) . contains ( "emscripten" ) {
995
- PathBuf :: from ( "emar" )
1006
+ //Windows use bat files so we have to be a bit more specific
1007
+ let tool = if cfg ! ( windows) {
1008
+ "emar.bat"
1009
+ } else {
1010
+ "emar"
1011
+ } ;
1012
+
1013
+ PathBuf :: from ( tool)
996
1014
} else {
997
1015
PathBuf :: from ( "ar" )
998
1016
}
You can’t perform that action at this time.
0 commit comments