Skip to content

Commit 420e756

Browse files
authored
Rollup merge of #107873 - zephaniahong:issue-107832-fix, r=albertlarsan68
Emit JSON output for the building of bootstrap itself Fixes #107832 . Main changes are from line 792 onwards. Other changes are due to the flake8 formatter. Let me know if I should not use the formatter.
2 parents 240d5e0 + 1057e21 commit 420e756

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/bootstrap.py

+4
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,8 @@ def build_bootstrap(self, color, verbose_count):
784784
if self.get_toml("metrics", "build"):
785785
args.append("--features")
786786
args.append("build-metrics")
787+
if self.json_output:
788+
args.append("--message-format=json")
787789
if color == "always":
788790
args.append("--color=always")
789791
elif color == "never":
@@ -841,6 +843,7 @@ def parse_args():
841843
parser.add_argument('--build')
842844
parser.add_argument('--color', choices=['always', 'never', 'auto'])
843845
parser.add_argument('--clean', action='store_true')
846+
parser.add_argument('--json-output', action='store_true')
844847
parser.add_argument('-v', '--verbose', action='count', default=0)
845848

846849
return parser.parse_known_args(sys.argv)[0]
@@ -852,6 +855,7 @@ def bootstrap(args):
852855
build.rust_root = os.path.abspath(os.path.join(__file__, '../../..'))
853856
build.verbose = args.verbose != 0
854857
build.clean = args.clean
858+
build.json_output = args.json_output
855859

856860
# Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config.toml`,
857861
# then `config.toml` in the root directory.

0 commit comments

Comments
 (0)