diff options
| author | David Wood <david@davidtw.co> | 2020-11-08 17:27:33 +0000 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2020-12-16 10:33:51 +0000 |
| commit | 99ad915e32744eb771e9a0968bf7d0d1f52a9a07 (patch) | |
| tree | f34d412ccdc0a3e0e3380747c4f02de3647e4c66 /compiler | |
| parent | 2b22670bdf614374b9371a229e9bcf692f58c6b3 (diff) | |
| download | rust-99ad915e32744eb771e9a0968bf7d0d1f52a9a07.tar.gz rust-99ad915e32744eb771e9a0968bf7d0d1f52a9a07.zip | |
compiletest: add split dwarf compare mode
This commit adds a Split DWARF compare mode to compiletest so that debuginfo tests are also tested using Split DWARF in split mode (and manually in single mode). Signed-off-by: David Wood <david@davidtw.co>
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 123d1ae55fb..ccd4d103ddb 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1037,6 +1037,13 @@ fn preserve_objects_for_their_debuginfo(sess: &Session) -> bool { return false; } + // Single mode keeps debuginfo in the same object file, but in such a way that it it skipped + // by the linker - so it's expected that when codegen units are linked together that this + // debuginfo would be lost without keeping around the temps. + if sess.opts.debugging_opts.split_dwarf == config::SplitDwarfKind::Single { + return true; + } + // If we're on OSX then the equivalent of split dwarf is turned on by // default. The final executable won't actually have any debug information // except it'll have pointers to elsewhere. Historically we've always run |
