Skip to content

Commit 59fcb7a

Browse files
authored
Rollup merge of #106811 - khuey:dwp_extension, r=davidtwco
Append .dwp to the binary filename instead of replacing the existing extension. gdb et al. expect to find the dwp file at `<binary>`.dwp, even if <binary> already has an extension (e.g. libfoo.so's dwp is expected to be at libfoo.so.dwp).
2 parents cc92bdb + 783caf3 commit 59fcb7a

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+2
-1
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,8 @@ fn link_dwarf_object<'a>(
599599
cg_results: &CodegenResults,
600600
executable_out_filename: &Path,
601601
) {
602-
let dwp_out_filename = executable_out_filename.with_extension("dwp");
602+
let mut dwp_out_filename = executable_out_filename.to_path_buf().into_os_string();
603+
dwp_out_filename.push(".dwp");
603604
debug!(?dwp_out_filename, ?executable_out_filename);
604605

605606
#[derive(Default)]

0 commit comments

Comments
 (0)