about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2023-12-24 19:49:23 -0500
committerjyn <github@jyn.dev>2024-12-14 20:38:46 -0500
commita4ef751e26a90dd3b6b35fdbfef1e4854f9d80e1 (patch)
treeca56569d14db3357482b5a8f007468f1f7a92fc7 /src/tools
parent903d2976fdb6ceeb65526b7555d8d1e6f8c02134 (diff)
downloadrust-a4ef751e26a90dd3b6b35fdbfef1e4854f9d80e1.tar.gz
rust-a4ef751e26a90dd3b6b35fdbfef1e4854f9d80e1.zip
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.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/run-make-support/src/external_deps/rustc.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/external_deps/rustc.rs b/src/tools/run-make-support/src/external_deps/rustc.rs
index ffe10092cc2..8894ea7fb20 100644
--- a/src/tools/run-make-support/src/external_deps/rustc.rs
+++ b/src/tools/run-make-support/src/external_deps/rustc.rs
@@ -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):