diff options
| author | Urgau <urgau@numericable.fr> | 2024-03-19 13:51:22 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2024-03-28 18:47:26 +0100 |
| commit | 777c6b46cc804a3bae345f9133d2e0a900026bdc (patch) | |
| tree | 90f59567aaa618414890be9de7d70dfc0b814101 /compiler/rustc_codegen_llvm/src | |
| parent | c5e7f45b6219a963e8e27ef6e15587f22e80a3f5 (diff) | |
| download | rust-777c6b46cc804a3bae345f9133d2e0a900026bdc.tar.gz rust-777c6b46cc804a3bae345f9133d2e0a900026bdc.zip | |
Simplify trim-paths feature by merging all debuginfo options together
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 031bbd63361..32a230ead03 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -257,13 +257,12 @@ pub fn target_machine_factory( }; let debuginfo_compression = SmallCStr::new(&debuginfo_compression); - let should_prefer_remapped_for_split_debuginfo_paths = - sess.should_prefer_remapped_for_split_debuginfo_paths(); + let should_prefer_remapped_paths = sess.should_prefer_remapped_for_codegen(); Arc::new(move |config: TargetMachineFactoryConfig| { let path_to_cstring_helper = |path: Option<PathBuf>| -> CString { let path = path.unwrap_or_default(); - let path = if should_prefer_remapped_for_split_debuginfo_paths { + let path = if should_prefer_remapped_paths { path_mapping.map_prefix(path).0 } else { path.into() diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index 3c76df11e3f..c24d9f3625b 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -875,7 +875,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>( ) // We get a path relative to the working directory from split_dwarf_path .map(|f| { - if tcx.sess.should_prefer_remapped_for_split_debuginfo_paths() { + if tcx.sess.should_prefer_remapped_for_codegen() { tcx.sess.source_map().path_mapping().map_prefix(f).0 } else { f.into() |
