Skip to content

Commit 3d16a20

Browse files
committed
Remap path in MCOptions
1 parent 42190bb commit 3d16a20

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+4
-1
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@ pub fn target_machine_factory(
205205
let use_init_array =
206206
!sess.opts.debugging_opts.use_ctors_section.unwrap_or(sess.target.use_ctors_section);
207207

208+
let path_mapping = sess.source_map().path_mapping().clone();
209+
208210
Arc::new(move |config: TargetMachineFactoryConfig| {
209-
let split_dwarf_file = config.split_dwarf_file.unwrap_or_default();
211+
let split_dwarf_file =
212+
path_mapping.map_prefix(config.split_dwarf_file.unwrap_or_default()).0;
210213
let split_dwarf_file = CString::new(split_dwarf_file.to_str().unwrap()).unwrap();
211214

212215
let tm = unsafe {

0 commit comments

Comments
 (0)