Skip to content

Commit 747019c

Browse files
committed
bootstrap.py: Respect build.jobs while building bootstrap tool
On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
1 parent caccb4d commit 747019c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bootstrap/bootstrap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ def __init__(self, config_toml="", args=None):
596596
self.download_url = (
597597
os.getenv("RUSTUP_DIST_SERVER") or self.stage0_data["dist_server"]
598598
)
599+
self.jobs = self.get_toml("jobs", "build") or "default"
599600

600601
self.build = args.build or self.build_triple()
601602

@@ -1144,6 +1145,7 @@ def build_bootstrap_cmd(self, env):
11441145
args = [
11451146
self.cargo(),
11461147
"build",
1148+
"--jobs=" + self.jobs,
11471149
"--manifest-path",
11481150
os.path.join(self.rust_root, "src/bootstrap/Cargo.toml"),
11491151
"-Zroot-dir=" + self.rust_root,

0 commit comments

Comments
 (0)