diff options
| author | Andy Wang <cbeuw.andy@gmail.com> | 2021-12-13 11:40:59 +0000 |
|---|---|---|
| committer | Andy Wang <cbeuw.andy@gmail.com> | 2021-12-13 11:40:59 +0000 |
| commit | 707f72c1dffc33f2980945371aa4fb2d9f77af6d (patch) | |
| tree | cba3c78d69a4b2346758d654fb074cf73ce250a3 /compiler/rustc_codegen_llvm/src | |
| parent | 3d16a20c7aa117773a957db9893f83a1cb3bd653 (diff) | |
| download | rust-707f72c1dffc33f2980945371aa4fb2d9f77af6d.tar.gz rust-707f72c1dffc33f2980945371aa4fb2d9f77af6d.zip | |
Revert "Produce .dwo file for Packed as well"
This reverts commit 32810223c6b743de889eda96b442f621c293a848.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 1ddc0cf8b9b..10170bd7b0e 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -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, )) |
