Skip to content

Commit 3281022

Browse files
committed
Produce .dwo file for Packed as well
1 parent 4abed50 commit 3281022

File tree

1 file changed

+8
-11
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+8
-11
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+8-11
Original file line numberDiff line numberDiff line change
@@ -901,17 +901,14 @@ pub(crate) unsafe fn codegen(
901901
.generic_activity_with_arg("LLVM_module_codegen_emit_obj", &module.name[..]);
902902

903903
let dwo_out = cgcx.output_filenames.temp_path_dwo(module_name);
904-
let dwo_out = match cgcx.split_debuginfo {
905-
// Don't change how DWARF is emitted in single mode (or when disabled).
906-
SplitDebuginfo::Off | SplitDebuginfo::Packed => None,
904+
let dwo_out = if cgcx.target_can_use_split_dwarf
905+
&& cgcx.split_debuginfo != SplitDebuginfo::Off
906+
{
907907
// Emit (a subset of the) DWARF into a separate file in split mode.
908-
SplitDebuginfo::Unpacked => {
909-
if cgcx.target_can_use_split_dwarf {
910-
Some(dwo_out.as_path())
911-
} else {
912-
None
913-
}
914-
}
908+
Some(dwo_out.as_path())
909+
} else {
910+
// Don't change how DWARF is emitted in single mode (or when disabled).
911+
None
915912
};
916913

917914
with_codegen(tm, llmod, config.no_builtins, |cpm| {
@@ -948,7 +945,7 @@ pub(crate) unsafe fn codegen(
948945

949946
Ok(module.into_compiled_module(
950947
config.emit_obj != EmitObj::None,
951-
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo == SplitDebuginfo::Unpacked,
948+
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo != SplitDebuginfo::Off,
952949
config.emit_bc,
953950
&cgcx.output_filenames,
954951
))

0 commit comments

Comments
 (0)