File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,22 @@ fn main() {
34
34
make = OsStr :: new ( "mozmake" ) . to_os_string ( ) ;
35
35
}
36
36
37
- let result = Command :: new ( make)
38
- . args ( & [ "-R" , "-f" , "makefile.cargo" ] )
37
+ let mut cmd = Command :: new ( make) ;
38
+
39
+ // We're using the MSYS make which doesn't work with the mingw32-make-style
40
+ // MAKEFLAGS, so remove that from the env if present.
41
+ if cfg ! ( windows) {
42
+ cmd. env_remove ( "MAKEFLAGS" ) . env_remove ( "MFLAGS" ) ;
43
+ } else if let Some ( makeflags) = env:: var_os ( "CARGO_MAKEFLAGS" ) {
44
+ cmd. env ( "MAKEFLAGS" , makeflags) ;
45
+ }
46
+
47
+ let result = cmd. args ( & [ "-R" , "-f" , "makefile.cargo" ] )
39
48
. stdout ( Stdio :: inherit ( ) )
40
49
. stderr ( Stdio :: inherit ( ) )
41
50
. status ( )
42
51
. expect ( "Failed to run `make`" ) ;
52
+
43
53
assert ! ( result. success( ) ) ;
44
54
println ! ( "cargo:rustc-link-search=native={}/js/src" , out_dir) ;
45
55
println ! ( "cargo:rustc-link-lib=static=js_static" ) ; // Must come before c++
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ SRC_DIR = $(shell pwd)
126
126
.PHONY : all maybe-configure
127
127
128
128
all: maybe-configure
129
- cd $(OUT_DIR) && $(MAKE) -f Makefile -j$(NUM_JOBS)
129
+ cd $(OUT_DIR) && $(MAKE) -f Makefile
130
130
131
131
# Only touch and run configure if we need to, to avoid unnecessary rebuilds.
132
132
# The second two time checks handle the case of configure.in and configure having
You can’t perform that action at this time.
0 commit comments