about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-18 18:08:51 +0000
committerbors <bors@rust-lang.org>2021-12-18 18:08:51 +0000
commit91a0600a5c22b9d159e3c57526af83e71d1120f8 (patch)
tree142be686bed6df375c8d289790e67dd1affd7fd9 /compiler/rustc_codegen_llvm/src/back/write.rs
parentd3848cb659105d8384c00ba384ec2f6f39c47238 (diff)
parent1ac1f24ddd54865f1719eb8c0e48c4858be1b744 (diff)
downloadrust-91a0600a5c22b9d159e3c57526af83e71d1120f8.tar.gz
rust-91a0600a5c22b9d159e3c57526af83e71d1120f8.zip
Auto merge of #92065 - matthiaskrgr:rollup-qmpcsuj, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #91566 (Apply path remapping to DW_AT_GNU_dwo_name when producing split DWARF)
 - #91926 (Remove `in_band_lifetimes` from `rustc_metadata`)
 - #91931 (Remove `in_band_lifetimes` from `rustc_codegen_llvm`)
 - #92024 (rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all platforms, not just Apple ones.)
 - #92037 (Use a const ParamEnv when in default_method_body_is_const)
 - #92047 (Set `RUST_BACKTRACE=0` when running location-detail tests)
 - #92050 (Add a space and 2 grave accents )

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index 3fceb2ac4ed..fb194a98a0d 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -46,7 +46,7 @@ pub fn llvm_err(handler: &rustc_errors::Handler, msg: &str) -> FatalError {
     }
 }
 
-pub fn write_output_file(
+pub fn write_output_file<'ll>(
     handler: &rustc_errors::Handler,
     target: &'ll llvm::TargetMachine,
     pm: &llvm::PassManager<'ll>,
@@ -205,8 +205,11 @@ pub fn target_machine_factory(
     let use_init_array =
         !sess.opts.debugging_opts.use_ctors_section.unwrap_or(sess.target.use_ctors_section);
 
+    let path_mapping = sess.source_map().path_mapping().clone();
+
     Arc::new(move |config: TargetMachineFactoryConfig| {
-        let split_dwarf_file = config.split_dwarf_file.unwrap_or_default();
+        let split_dwarf_file =
+            path_mapping.map_prefix(config.split_dwarf_file.unwrap_or_default()).0;
         let split_dwarf_file = CString::new(split_dwarf_file.to_str().unwrap()).unwrap();
 
         let tm = unsafe {