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>
This commit is contained in:
David Wood 2020-11-08 17:27:33 +00:00
parent 2b22670bdf
commit 99ad915e32
No known key found for this signature in database
GPG key ID: 2592E76C87381FD9
5 changed files with 27 additions and 1 deletions

View file

@ -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