Skip to content

Commit 8df4517

Browse files
authored
Add NUM_JOBS env var to cargo build scripts (#1216)
Some build scripts use this. It is documented at https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
1 parent 628e85e commit 8df4517

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cargo/cargo_build_script.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def _build_script_impl(ctx):
8383
"CARGO_MANIFEST_DIR": manifest_dir,
8484
"CARGO_PKG_NAME": pkg_name,
8585
"HOST": toolchain.exec_triple,
86+
"NUM_JOBS": "1",
8687
"OPT_LEVEL": compilation_mode_opt_level,
8788
"RUSTC": toolchain.rustc.path,
8889
"TARGET": toolchain.target_flag_value,

0 commit comments

Comments
 (0)