Skip to content

Commit 707f72c

Browse files
committed
Revert "Produce .dwo file for Packed as well"
This reverts commit 3281022.
1 parent 3d16a20 commit 707f72c

File tree

1 file changed

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

1 file changed

+11
-8
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

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

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

917920
with_codegen(tm, llmod, config.no_builtins, |cpm| {
@@ -948,7 +951,7 @@ pub(crate) unsafe fn codegen(
948951

949952
Ok(module.into_compiled_module(
950953
config.emit_obj != EmitObj::None,
951-
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo != SplitDebuginfo::Off,
954+
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo == SplitDebuginfo::Unpacked,
952955
config.emit_bc,
953956
&cgcx.output_filenames,
954957
))

0 commit comments

Comments
 (0)