Skip to content

Commit 0a927bb

Browse files
authored
chore: When calling make from build.rs, pass -j $NUM_JOBS (#159)
#159
1 parent c405fb6 commit 0a927bb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ log = "0.4.11"
1111
structopt = "0.3.20"
1212
tempfile = "3.1.0"
1313
wizer = "1.4.0"
14-
1514
tree-sitter = "~0.20"
1615
tree-sitter-javascript = "~0.20"

build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ fn build_engine(src: &PathBuf, out_dir: &Path) {
3434
let makefile_path = src.join("js-compute-runtime").join("Makefile");
3535
let status = Command::new("make")
3636
.current_dir(out_dir)
37+
.arg("-j")
38+
.arg(var_os("NUM_JOBS").unwrap())
3739
.arg("-f")
3840
.arg(makefile_path)
3941
.status()

c-dependencies/js-compute-runtime/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ $(RUST_URL_LIB): $(RUST_URL_RS_FILES) $(RUST_URL_SRC)/Cargo.toml $(RUST_URL_SRC)
5959
%.o: $(FSM_SRC)%.cpp $(FSM_SRC)Makefile $(RUST_URL_LIB) compiler_flags
6060
$(WASI_CXX) $(CXX_FLAGS) $(CXX_OPT) $(DEFINES) -I $(SM_SRC)include -MMD -MP -c -o $@ $<
6161

62-
builtins/%.o: $(FSM_SRC)builtins/%.cpp $(FSM_SRC)Makefile $(RUST_URL_LIB) compiler_flags
62+
builtins:
63+
$Q mkdir -p builtins
64+
65+
builtins/%.o: $(FSM_SRC)builtins/%.cpp $(FSM_SRC)Makefile $(RUST_URL_LIB) compiler_flags | builtins
6366
$(WASI_CXX) $(CXX_FLAGS) $(CXX_OPT) $(DEFINES) -I $(SM_SRC)include -MMD -MP -c -o $@ $<
6467

6568
js-compute-runtime.wasm: $(FSM_OBJ) $(SM_OBJ) $(RUST_URL_LIB)

0 commit comments

Comments
 (0)