about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJ. Neuschäfer <j.ne@posteo.net>2025-09-24 07:28:32 +0000
committerJ. Neuschäfer <j.ne@posteo.net>2025-09-25 12:08:58 +0200
commit747019ce4647dd2194c2d9e08d482e4d9c669069 (patch)
treec60f42182ab40bddb86a169c63566f22b7566cd2
parentcaccb4d0368bd918ef6668af8e13834d07040417 (diff)
downloadrust-747019ce4647dd2194c2d9e08d482e4d9c669069.tar.gz
rust-747019ce4647dd2194c2d9e08d482e4d9c669069.zip
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.
-rw-r--r--src/bootstrap/bootstrap.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index effd33d288f..8b1775178c9 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -596,6 +596,7 @@ class RustBuild(object):
         self.download_url = (
             os.getenv("RUSTUP_DIST_SERVER") or self.stage0_data["dist_server"]
         )
+        self.jobs = self.get_toml("jobs", "build") or "default"
 
         self.build = args.build or self.build_triple()
 
@@ -1144,6 +1145,7 @@ class RustBuild(object):
         args = [
             self.cargo(),
             "build",
+            "--jobs=" + self.jobs,
             "--manifest-path",
             os.path.join(self.rust_root, "src/bootstrap/Cargo.toml"),
             "-Zroot-dir=" + self.rust_root,