@@ -743,7 +743,7 @@ def bootstrap_binary(self):
743
743
"""
744
744
return os .path .join (self .build_dir , "bootstrap" , "debug" , "bootstrap" )
745
745
746
- def build_bootstrap (self ):
746
+ def build_bootstrap (self , color ):
747
747
"""Build bootstrap"""
748
748
print ("Building rustbuild" )
749
749
build_dir = os .path .join (self .build_dir , "bootstrap" )
@@ -800,6 +800,11 @@ def build_bootstrap(self):
800
800
if self .get_toml ("metrics" , "build" ):
801
801
args .append ("--features" )
802
802
args .append ("build-metrics" )
803
+ if color == "always" :
804
+ args .append ("--color=always" )
805
+ elif color == "never" :
806
+ args .append ("--color=never" )
807
+
803
808
run (args , env = env , verbose = self .verbose )
804
809
805
810
def build_triple (self ):
@@ -862,6 +867,7 @@ def bootstrap(help_triggered):
862
867
parser = argparse .ArgumentParser (description = 'Build rust' )
863
868
parser .add_argument ('--config' )
864
869
parser .add_argument ('--build' )
870
+ parser .add_argument ('--color' , choices = ['always' , 'never' , 'auto' ])
865
871
parser .add_argument ('--clean' , action = 'store_true' )
866
872
parser .add_argument ('-v' , '--verbose' , action = 'count' , default = 0 )
867
873
@@ -930,7 +936,7 @@ def bootstrap(help_triggered):
930
936
# Fetch/build the bootstrap
931
937
build .download_toolchain ()
932
938
sys .stdout .flush ()
933
- build .build_bootstrap ()
939
+ build .build_bootstrap (args . color )
934
940
sys .stdout .flush ()
935
941
936
942
# Run the bootstrap
0 commit comments