Revert "Produce .dwo file for Packed as well"

This reverts commit 32810223c6.
This commit is contained in:
Andy Wang 2021-12-13 11:40:59 +00:00
parent 3d16a20c7a
commit 707f72c1df
No known key found for this signature in database
GPG Key ID: 181B49F9F38F3374

View File

@ -904,14 +904,17 @@ pub(crate) unsafe fn codegen(
.generic_activity_with_arg("LLVM_module_codegen_emit_obj", &module.name[..]);
let dwo_out = cgcx.output_filenames.temp_path_dwo(module_name);
let dwo_out = if cgcx.target_can_use_split_dwarf
&& cgcx.split_debuginfo != SplitDebuginfo::Off
{
// Emit (a subset of the) DWARF into a separate file in split mode.
Some(dwo_out.as_path())
} else {
let dwo_out = match cgcx.split_debuginfo {
// Don't change how DWARF is emitted in single mode (or when disabled).
None
SplitDebuginfo::Off | SplitDebuginfo::Packed => None,
// Emit (a subset of the) DWARF into a separate file in split mode.
SplitDebuginfo::Unpacked => {
if cgcx.target_can_use_split_dwarf {
Some(dwo_out.as_path())
} else {
None
}
}
};
with_codegen(tm, llmod, config.no_builtins, |cpm| {
@ -948,7 +951,7 @@ pub(crate) unsafe fn codegen(
Ok(module.into_compiled_module(
config.emit_obj != EmitObj::None,
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo != SplitDebuginfo::Off,
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo == SplitDebuginfo::Unpacked,
config.emit_bc,
&cgcx.output_filenames,
))