Skip to content

Commit

Permalink
Rollup merge of #106811 - khuey:dwp_extension, r=davidtwco
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
matthiaskrgr authored Jan 26, 2023
2 parents cc92bdb + 783caf3 commit 59fcb7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ fn link_dwarf_object<'a>(
cg_results: &CodegenResults,
executable_out_filename: &Path,
) {
let dwp_out_filename = executable_out_filename.with_extension("dwp");
let mut dwp_out_filename = executable_out_filename.to_path_buf().into_os_string();
dwp_out_filename.push(".dwp");
debug!(?dwp_out_filename, ?executable_out_filename);

#[derive(Default)]
Expand Down

0 comments on commit 59fcb7a

Please sign in to comment.