about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-29 15:06:55 +0000
committerbors <bors@rust-lang.org>2025-09-29 15:06:55 +0000
commitdc2c3564d273cf8ccce32dc4f47eaa27063bceb9 (patch)
treee239ceac40bcb75cf372c798d5e901da385bbf51 /src/doc
parent21a13b8864a7dd614e9a96afd57b58c7fcf0bd6b (diff)
parenteb3fb457f14c419b58fc8b20d72efcea94e06d9f (diff)
downloadrust-dc2c3564d273cf8ccce32dc4f47eaa27063bceb9.tar.gz
rust-dc2c3564d273cf8ccce32dc4f47eaa27063bceb9.zip
Auto merge of #146376 - durin42:dwo-specify-path, r=davidtwco
debuginfo: add an unstable flag to write split DWARF to an explicit directory

Bazel requires knowledge of outputs from actions at analysis time, including file or directory name. In order to work around the lack of predictable output name for dwo files, we group the dwo files in a subdirectory of --out-dir as a post-processing step before returning control to bazel. Unfortunately some debugging workflows rely on directly opening the dwo file rather than loading the merged dwp file, and our trick of moving the files breaks those users. We can't just hardlink the file or copy it, because with remote build execution we wouldn't end up with the un-moved file copied back to the developer's workstation. As a fix, we add this unstable flag that causes dwo files to be written to a build-system-controllable location, which then lets bazel hoover up the dwo files, but the objects also have the correct path for the dwo files.

r? `@davidtwco`
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/unstable-book/src/compiler-flags/split-dwarf-out-dir.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/split-dwarf-out-dir.md b/src/doc/unstable-book/src/compiler-flags/split-dwarf-out-dir.md
new file mode 100644
index 00000000000..a2070730b42
--- /dev/null
+++ b/src/doc/unstable-book/src/compiler-flags/split-dwarf-out-dir.md
@@ -0,0 +1,7 @@
+# `split-dwarf-out-dir`
+
+On systems which use DWARF debug info this flag causes `.dwo` files produced
+by `-C split-debuginfo` to be written to the specified directory rather than
+placed next to the object files. This is mostly useful if you have a build
+system which needs to control where to find compile outputs without running the
+compiler and have to put your `.dwo` files in a separate directory.