about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index 98480dc90c6..d27df052d43 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -264,10 +264,11 @@ pub fn target_machine_factory(
     Arc::new(move |config: TargetMachineFactoryConfig| {
         let path_to_cstring_helper = |path: Option<PathBuf>| -> CString {
             let path = path.unwrap_or_default();
+            let path = path_mapping.to_real_filename(path);
             let path = if should_prefer_remapped_paths {
-                path_mapping.map_prefix(path).0
+                path.remapped_path_if_available()
             } else {
-                path.into()
+                path.local_path_if_available()
             };
             CString::new(path.to_str().unwrap()).unwrap()
         };