@@ -784,6 +784,8 @@ def build_bootstrap(self, color, verbose_count):
784
784
if self .get_toml ("metrics" , "build" ):
785
785
args .append ("--features" )
786
786
args .append ("build-metrics" )
787
+ if self .json_output :
788
+ args .append ("--message-format=json" )
787
789
if color == "always" :
788
790
args .append ("--color=always" )
789
791
elif color == "never" :
@@ -841,6 +843,7 @@ def parse_args():
841
843
parser .add_argument ('--build' )
842
844
parser .add_argument ('--color' , choices = ['always' , 'never' , 'auto' ])
843
845
parser .add_argument ('--clean' , action = 'store_true' )
846
+ parser .add_argument ('--json-output' , action = 'store_true' )
844
847
parser .add_argument ('-v' , '--verbose' , action = 'count' , default = 0 )
845
848
846
849
return parser .parse_known_args (sys .argv )[0 ]
@@ -852,6 +855,7 @@ def bootstrap(args):
852
855
build .rust_root = os .path .abspath (os .path .join (__file__ , '../../..' ))
853
856
build .verbose = args .verbose != 0
854
857
build .clean = args .clean
858
+ build .json_output = args .json_output
855
859
856
860
# Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config.toml`,
857
861
# then `config.toml` in the root directory.
0 commit comments