Add --quiet flag to x.py and bootstrap to suppress output#154616
Add --quiet flag to x.py and bootstrap to suppress output#154616erickt wants to merge 1 commit intorust-lang:mainfrom
--quiet flag to x.py and bootstrap to suppress output#154616Conversation
|
This PR modifies If appropriate, please update This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I can only look into these this weekend, but cc also #154587 (It would be nice to be careful that we don't use --quiet to mean different things) |
|
Ha! What a coincidence. I’m certainly intending to have the same semantics as that PR, so I think they should be compatible with each other. I’m happy to wait for it to land since it beat me by a few hours, then I can match the style with whatever you finalize on. |
|
(I think either one can land first, I was just remarking just in case we somehow have |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the patience. So I looked at both this PR and the #154587, and I think I would say:
I'll review this PR now. |
|
Reminder, once the PR becomes ready for a review, use |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This adds a `--quiet` flag to x.py and bootstrap to suppress some of the output when compiling Rust. It conflicts with `--verbose`, matching the behavior of `cargo` which does not allow `--verbose` and `--quiet`. It works by passing quiet flags down to the underlying cargo, or LLVM build processes. Note that for LLVM, we only can suppress logs when we explicitly configure it with ninja. Otherwise we won't know what flag to pass along to whichever build system cmake decides to use. This can be helpful with AI workloads in the Rust codebase to help shrink down the output to reduce token usage, which can help prevent context pollution and lower costs. This patch was partially generated with Gemini, but I've reviewed the changes it made.
|
@jieyouxu - Thanks for the review! I force pushed a rebased version, and tried to address your comments. I can't find one though where you asked for the reasoning behind it. I updated the PR doc (and with this version I did use gemini to simplify things, and noted that in the comment). My interest in this was from doing some AI driven bug hunting with Gemini for #150907, and I thought that if we could suppress output from the Rust build we could cut down on wasted tokens to avoid context pollution and avoid spending extra on unnecessary tokens. @rustbot ready |
There was a problem hiding this comment.
Thanks, given that I anticipate this is more for local usage, even if it hides a few too many / too little warnings and whatever it's not a huge problem, because you can always attempt a rebuild without --quiet.
@bors r+ rollup
Add `--quiet` flag to x.py and bootstrap to suppress output This adds a `--quiet` flag to x.py and bootstrap to suppress some of the output when compiling Rust. It conflicts with `--verbose`, matching the behavior of `cargo` which does not allow `--verbose` and `--quiet`. It works by passing quiet flags down to the underlying cargo, or LLVM build processes. Note that for LLVM, we only can suppress logs when we explicitly configure it with ninja. Otherwise we won't know what flag to pass along to whichever build system cmake decides to use. This can be helpful with AI workloads in the Rust codebase to help shrink down the output to reduce token usage, which can help prevent context pollution and lower costs. This patch was partially generated with Gemini, but I've reviewed the changes it made.
Rollup of 18 pull requests Successful merges: - #154595 (Emit fatal on invalid const args with nested defs) - #154599 (report the `varargs_without_pattern` lint in deps) - #154699 (`core::unicode`: Replace `Cased` table with `Lt`) - #155353 (resolve: Remove `inaccessible_ctor_reexport` resolver field) - #155357 (Add `--remap-path-scope` as unstable in rustdoc) - #150649 (clippy fix: non_canonical_clone_impl) - #154604 (abort in core) - #154616 (Add `--quiet` flag to x.py and bootstrap to suppress output) - #154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases) - #155215 (Clean up `AttributeLintKind` and refactor diagnostic attribute linting) - #155228 (Check diagnostic output in incremental `cpass` and `rpass` revisions) - #155266 (Adjust release notes for post-merge feedback) - #155326 (Disallow ZST allocations with `TypedArena`.) - #155334 (docs: Use `0b1` instead of `NonZero::MIN` in `NonZero::bit_width` doctests) - #155340 (Handle nonnull pattern types in size skeleton) - #155347 (Add push_mut and new Layout methods to release notes) - #155356 (remove calls to AliasTyKind::def_id) - #155364 (Reduce diagnostic type visibilities.)
Add `--quiet` flag to x.py and bootstrap to suppress output This adds a `--quiet` flag to x.py and bootstrap to suppress some of the output when compiling Rust. It conflicts with `--verbose`, matching the behavior of `cargo` which does not allow `--verbose` and `--quiet`. It works by passing quiet flags down to the underlying cargo, or LLVM build processes. Note that for LLVM, we only can suppress logs when we explicitly configure it with ninja. Otherwise we won't know what flag to pass along to whichever build system cmake decides to use. This can be helpful with AI workloads in the Rust codebase to help shrink down the output to reduce token usage, which can help prevent context pollution and lower costs. This patch was partially generated with Gemini, but I've reviewed the changes it made.
View all comments
This adds a
--quietflag to x.py and bootstrap to suppress some of the output when compiling Rust. It conflicts with--verbose, matching the behavior ofcargowhich does not allow--verboseand--quiet.It works by passing quiet flags down to the underlying cargo, or LLVM build processes. Note that for LLVM, we only can suppress logs when we explicitly configure it with ninja. Otherwise we won't know what flag to pass along to whichever build system cmake decides to use.
This can be helpful with AI workloads in the Rust codebase to help shrink down the output to reduce token usage, which can help prevent context pollution and lower costs.
This patch was partially generated with Gemini, but I've reviewed the changes it made.