@@ -904,14 +904,17 @@ pub(crate) unsafe fn codegen(
904
904
. generic_activity_with_arg ( "LLVM_module_codegen_emit_obj" , & module. name [ ..] ) ;
905
905
906
906
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 {
913
908
// 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
+ }
915
918
} ;
916
919
917
920
with_codegen ( tm, llmod, config. no_builtins , |cpm| {
@@ -948,7 +951,7 @@ pub(crate) unsafe fn codegen(
948
951
949
952
Ok ( module. into_compiled_module (
950
953
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 ,
952
955
config. emit_bc ,
953
956
& cgcx. output_filenames ,
954
957
) )
0 commit comments