@@ -743,7 +743,7 @@ def bootstrap_binary(self):
743743 """
744744 return os .path .join (self .build_dir , "bootstrap" , "debug" , "bootstrap" )
745745
746- def build_bootstrap (self ):
746+ def build_bootstrap (self , color ):
747747 """Build bootstrap"""
748748 print ("Building rustbuild" )
749749 build_dir = os .path .join (self .build_dir , "bootstrap" )
@@ -800,6 +800,11 @@ def build_bootstrap(self):
800800 if self .get_toml ("metrics" , "build" ):
801801 args .append ("--features" )
802802 args .append ("build-metrics" )
803+ if color == "always" :
804+ args .append ("--color=always" )
805+ elif color == "never" :
806+ args .append ("--color=never" )
807+
803808 run (args , env = env , verbose = self .verbose )
804809
805810 def build_triple (self ):
@@ -862,6 +867,7 @@ def bootstrap(help_triggered):
862867 parser = argparse .ArgumentParser (description = 'Build rust' )
863868 parser .add_argument ('--config' )
864869 parser .add_argument ('--build' )
870+ parser .add_argument ('--color' , choices = ['always' , 'never' , 'auto' ])
865871 parser .add_argument ('--clean' , action = 'store_true' )
866872 parser .add_argument ('-v' , '--verbose' , action = 'count' , default = 0 )
867873
@@ -930,7 +936,7 @@ def bootstrap(help_triggered):
930936 # Fetch/build the bootstrap
931937 build .download_toolchain ()
932938 sys .stdout .flush ()
933- build .build_bootstrap ()
939+ build .build_bootstrap (args . color )
934940 sys .stdout .flush ()
935941
936942 # Run the bootstrap
0 commit comments