Skip to content

Commit f0e8c2f

Browse files
authored
Rollup merge of #146609 - lolbinarycat:bootstrap-less-verbose-cargo, r=Kobzol
bootstrap: lower verbosity of cargo to one less than bootstrap's the main thing this does is eliminate the "Fresh ..." output when `--verbose` is only passed once. r? `@Kobzol`
2 parents cc315a8 + 29ca09b commit f0e8c2f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/bootstrap/bootstrap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,8 @@ def build_bootstrap_cmd(self, env):
11451145
os.path.join(self.rust_root, "src/bootstrap/Cargo.toml"),
11461146
"-Zroot-dir=" + self.rust_root,
11471147
]
1148-
args.extend("--verbose" for _ in range(self.verbose))
1148+
# verbose cargo output is very noisy, so only enable it with -vv
1149+
args.extend("--verbose" for _ in range(self.verbose - 1))
11491150

11501151
if "BOOTSTRAP_TRACING" in env:
11511152
args.append("--features=tracing")

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3418,9 +3418,6 @@ impl Step for TierCheck {
34183418
);
34193419
cargo.arg(builder.src.join("src/doc/rustc/src/platform-support.md"));
34203420
cargo.arg(builder.rustc(self.test_compiler));
3421-
if builder.is_verbose() {
3422-
cargo.arg("--verbose");
3423-
}
34243421

34253422
let _guard = builder.msg_test(
34263423
"platform support check",

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ impl Builder<'_> {
11331133
cargo.env("RUSTC_BACKTRACE_ON_ICE", "1");
11341134
}
11351135

1136-
if self.is_verbose() {
1136+
if self.is_verbose_than(1) {
11371137
// This provides very useful logs especially when debugging build cache-related stuff.
11381138
cargo.env("CARGO_LOG", "cargo::core::compiler::fingerprint=info");
11391139
}
@@ -1275,8 +1275,9 @@ impl Builder<'_> {
12751275
cargo.env("WINAPI_NO_BUNDLED_LIBRARIES", "1");
12761276
}
12771277

1278-
for _ in 0..self.verbosity {
1279-
cargo.arg("-v");
1278+
// verbose cargo output is very noisy, so only enable it with -vv
1279+
for _ in 0..self.verbosity.saturating_sub(1) {
1280+
cargo.arg("--verbose");
12801281
}
12811282

12821283
match (mode, self.config.rust_codegen_units_std, self.config.rust_codegen_units) {

0 commit comments

Comments
 (0)