don't show the full linker args unless --verbose is passed

the linker arguments can be *very* long, especially for crates with many dependencies. some parts of them are not very useful. unless specifically requested:
- omit object files specific to the current invocation
- fold rlib files into a single braced argument (in shell expansion format)

this shortens the output significantly without removing too much information.
This commit is contained in:
jyn 2023-12-24 19:49:23 -05:00
parent 903d2976fd
commit a4ef751e26
8 changed files with 126 additions and 14 deletions

View file

@ -325,6 +325,12 @@ impl Rustc {
self
}
/// Pass the `--verbose` flag.
pub fn verbose(&mut self) -> &mut Self {
self.cmd.arg("--verbose");
self
}
/// `EXTRARSCXXFLAGS`
pub fn extra_rs_cxx_flags(&mut self) -> &mut Self {
// Adapted from tools.mk (trimmed):