Skip to content

Commit eb3fb45

Browse files
committed
split-dwarf: add documentation and test coverage
1 parent 77c6acc commit eb3fb45

File tree

3 files changed

+152
-12
lines changed

3 files changed

+152
-12
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `split-dwarf-out-dir`
2+
3+
On systems which use DWARF debug info this flag causes `.dwo` files produced
4+
by `-C split-debuginfo` to be written to the specified directory rather than
5+
placed next to the object files. This is mostly useful if you have a build
6+
system which needs to control where to find compile outputs without running the
7+
compiler and have to put your `.dwo` files in a separate directory.

src/tools/run-make-support/src/external_deps/rustc.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,13 @@ impl Rustc {
366366
self
367367
}
368368

369+
pub fn split_dwarf_out_dir(&mut self, out_dir: Option<&str>) -> &mut Self {
370+
if let Some(out_dir) = out_dir {
371+
self.cmd.arg(format!("-Zsplit-dwarf-out-dir={out_dir}"));
372+
}
373+
self
374+
}
375+
369376
/// Pass the `--verbose` flag.
370377
pub fn verbose(&mut self) -> &mut Self {
371378
self.cmd.arg("--verbose");

0 commit comments

Comments
 (0)