diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-01-26 07:53:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-26 07:53:23 +0100 |
| commit | 59fcb7a2ce15f96fb4a0ce82f42503cf135aa81e (patch) | |
| tree | 0b36a9e72151d182391b78e5696325bfb25a607b /compiler/rustc_codegen_ssa/src | |
| parent | cc92bdb9c99b944b77833f3f2cd0e362c94bf861 (diff) | |
| parent | 783caf3702fa28aeeaebd413eb9072399506eab1 (diff) | |
| download | rust-59fcb7a2ce15f96fb4a0ce82f42503cf135aa81e.tar.gz rust-59fcb7a2ce15f96fb4a0ce82f42503cf135aa81e.zip | |
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).
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index b148e4185a6..0a7bf6ff00c 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -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)] |
