diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-06-26 19:47:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-26 19:47:05 +0200 |
| commit | 0c09846e89bedd28990e78dd4ddbe2f0af48326e (patch) | |
| tree | b747d0ee0264c3000da0d6edd318b8a4b35169bc /src | |
| parent | 0b3b4ef2b521496b90345e62ef121bd1c9daba4d (diff) | |
| parent | 028fd634bbf5253b1c1455e341e9b91424c44f39 (diff) | |
Rollup merge of #98528 - jyn514:bootstrap-color, r=Mark-Simulacrum
Respect --color when building rustbuild itself Separated out from https://github.com/rust-lang/rust/pull/95503.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 457fedd2d8a..8000e60f64d 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -743,7 +743,7 @@ class RustBuild(object): """ return os.path.join(self.build_dir, "bootstrap", "debug", "bootstrap") - def build_bootstrap(self): + def build_bootstrap(self, color): """Build bootstrap""" print("Building rustbuild") build_dir = os.path.join(self.build_dir, "bootstrap") @@ -800,6 +800,11 @@ class RustBuild(object): if self.get_toml("metrics", "build"): args.append("--features") args.append("build-metrics") + if color == "always": + args.append("--color=always") + elif color == "never": + args.append("--color=never") + run(args, env=env, verbose=self.verbose) def build_triple(self): @@ -862,6 +867,7 @@ def bootstrap(help_triggered): parser = argparse.ArgumentParser(description='Build rust') parser.add_argument('--config') parser.add_argument('--build') + parser.add_argument('--color', choices=['always', 'never', 'auto']) parser.add_argument('--clean', action='store_true') parser.add_argument('-v', '--verbose', action='count', default=0) @@ -930,7 +936,7 @@ def bootstrap(help_triggered): # Fetch/build the bootstrap build.download_toolchain() sys.stdout.flush() - build.build_bootstrap() + build.build_bootstrap(args.color) sys.stdout.flush() # Run the bootstrap |
