Skip to content

Commit 10e3d92

Browse files
committed
Label more build steps.
Currently the output of a command like `./x.py build --stage 0 library/std` is this: ``` Updating only changed submodules Submodules updated in 0.02 seconds extracting [...] Compiling [...] Finished dev [unoptimized] target(s) in 17.53s Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) Compling [...] Finished release [optimized + debuginfo] target(s) in 21.99s Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) Build completed successfully in 0:00:51 ``` I find the part before the "Building stage0 std artifacts" a bit confusing. After this commit, it looks like this: ``` Updating only changed submodules Submodules updated in 0.02 seconds extracting [...] Building rustbuild Compiling [...] Finished dev [unoptimized] target(s) in 17.53s Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) Compling [...] Finished release [optimized + debuginfo] target(s) in 21.99s Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) Build completed successfully in 0:00:51 ``` The "Building rustbuild" label makes it clear what the first cargo build invocation is for. The indentation of the "Submodules updated" line indicates it is a sub-step of a parent task.
1 parent ddabe07 commit 10e3d92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/bootstrap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ def bootstrap_binary(self):
974974

975975
def build_bootstrap(self):
976976
"""Build bootstrap"""
977+
print("Building rustbuild")
977978
build_dir = os.path.join(self.build_dir, "bootstrap")
978979
if self.clean and os.path.exists(build_dir):
979980
shutil.rmtree(build_dir)
@@ -1133,7 +1134,7 @@ def update_submodules(self):
11331134
recorded_submodules[data[3]] = data[2]
11341135
for module in filtered_submodules:
11351136
self.update_submodule(module[0], module[1], recorded_submodules)
1136-
print("Submodules updated in %.2f seconds" % (time() - start_time))
1137+
print(" Submodules updated in %.2f seconds" % (time() - start_time))
11371138

11381139
def set_dist_environment(self, url):
11391140
"""Set download URL for normal environment"""

0 commit comments

Comments
 (0)