Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,8 @@ def build_bootstrap_cmd(self, env):
os.path.join(self.rust_root, "src/bootstrap/Cargo.toml"),
"-Zroot-dir=" + self.rust_root,
]
args.extend("--verbose" for _ in range(self.verbose))
# verbose cargo output is very noisy, so only enable it with -vv
args.extend("--verbose" for _ in range(self.verbose - 1))

if "BOOTSTRAP_TRACING" in env:
args.append("--features=tracing")
Expand Down
3 changes: 0 additions & 3 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3418,9 +3418,6 @@ impl Step for TierCheck {
);
cargo.arg(builder.src.join("src/doc/rustc/src/platform-support.md"));
cargo.arg(builder.rustc(self.test_compiler));
if builder.is_verbose() {
cargo.arg("--verbose");
}
Comment on lines -3421 to -3423
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're already setting verbosity in Builder::cargo, which is indirectly called by prepare_tool_cargo, so this is not needed.


let _guard = builder.msg_test(
"platform support check",
Expand Down
7 changes: 4 additions & 3 deletions src/bootstrap/src/core/builder/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ impl Builder<'_> {
cargo.env("RUSTC_BACKTRACE_ON_ICE", "1");
}

if self.is_verbose() {
if self.is_verbose_than(1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, that's a weird (pre-existing) function name. I had to look at the code to understand what it meant. is_more_verbose_than would be clearer. Even clearer would be just removing it and using if self.verbosity > 1 directly. The related verbose_than function could also be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the names are pretty terrible here, I plan to rename them, once I get to it.

// This provides very useful logs especially when debugging build cache-related stuff.
cargo.env("CARGO_LOG", "cargo::core::compiler::fingerprint=info");
}
Expand Down Expand Up @@ -1275,8 +1275,9 @@ impl Builder<'_> {
cargo.env("WINAPI_NO_BUNDLED_LIBRARIES", "1");
}

for _ in 0..self.verbosity {
cargo.arg("-v");
// verbose cargo output is very noisy, so only enable it with -vv
for _ in 0..self.verbosity.saturating_sub(1) {
cargo.arg("--verbose");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed from -v to --verbose for consistency and grepability.

}

match (mode, self.config.rust_codegen_units_std, self.config.rust_codegen_units) {
Expand Down
Loading