diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2020-10-01 17:25:54 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2020-10-01 17:30:24 +0200 |
| commit | fde113591680c96459abdc4aae5d2b0dc21da87b (patch) | |
| tree | 0e1241fee290b20b5cce8649ce6655cd14f4b881 | |
| parent | acd8e59b6650deab3979e82b49c8c26e0f4ceefa (diff) | |
| download | rust-fde113591680c96459abdc4aae5d2b0dc21da87b.tar.gz rust-fde113591680c96459abdc4aae5d2b0dc21da87b.zip | |
build-manifest: avoid collecting SHAs in parallel on legacy mode
This avoids overloading the old server, and disrupting the other programs running on it.
| -rw-r--r-- | src/tools/build-manifest/src/main.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 91f042a07d4..1a698bbac05 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -207,6 +207,14 @@ fn main() { // related code in this tool and ./x.py dist hash-and-sign can be removed. let legacy = env::var("BUILD_MANIFEST_LEGACY").is_ok(); + // Avoid overloading the old server in legacy mode. + if legacy { + rayon::ThreadPoolBuilder::new() + .num_threads(1) + .build_global() + .expect("failed to initialize Rayon"); + } + let mut args = env::args().skip(1); let input = PathBuf::from(args.next().unwrap()); let output = PathBuf::from(args.next().unwrap()); |
