Introduce FileNameMapping::to_real_filename
and use it everywhere
This commit is contained in:
parent
ee2898d3f1
commit
4f4fa42b0e
6 changed files with 42 additions and 41 deletions
|
@ -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()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue