File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
compiler/rustc_metadata/src/rmeta
src/bootstrap/src/core/builder Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -1675,15 +1675,14 @@ impl<'a> CrateMetadataRef<'a> {
16751675 for virtual_dir in virtual_source_base_dir. iter ( ) . flatten ( ) {
16761676 if let Some ( real_dir) = & real_source_base_dir
16771677 && let rustc_span:: FileName :: Real ( old_name) = name
1678- && let ( _working_dir, embeddable_name) =
1679- old_name. embeddable_name ( RemapPathScopeComponents :: MACRO )
1680- && let Ok ( rest) = embeddable_name. strip_prefix ( virtual_dir)
1678+ && let virtual_path = old_name. path ( RemapPathScopeComponents :: MACRO )
1679+ && let Ok ( rest) = virtual_path. strip_prefix ( virtual_dir)
16811680 {
16821681 let new_path = real_dir. join ( rest) ;
16831682
16841683 debug ! (
16851684 "try_to_translate_virtual_to_real: `{}` -> `{}`" ,
1686- embeddable_name . display( ) ,
1685+ virtual_path . display( ) ,
16871686 new_path. display( ) ,
16881687 ) ;
16891688
Original file line number Diff line number Diff line change @@ -1032,10 +1032,7 @@ impl Builder<'_> {
10321032 self . build . debuginfo_map_to ( GitRepo :: Rustc , RemapScheme :: Compiler )
10331033 {
10341034 // When building compiler sources, we want to apply the compiler remap scheme.
1035- cargo. env (
1036- "RUSTC_DEBUGINFO_MAP" ,
1037- format ! ( "{}={}" , self . build. src. display( ) , map_to) ,
1038- ) ;
1035+ cargo. env ( "RUSTC_DEBUGINFO_MAP" , format ! ( "compiler/={map_to}/compiler" ) ) ;
10391036 cargo. env ( "CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR" , map_to) ;
10401037 }
10411038 }
@@ -1047,10 +1044,7 @@ impl Builder<'_> {
10471044 if let Some ( ref map_to) =
10481045 self . build . debuginfo_map_to ( GitRepo :: Rustc , RemapScheme :: NonCompiler )
10491046 {
1050- cargo. env (
1051- "RUSTC_DEBUGINFO_MAP" ,
1052- format ! ( "{}={}" , self . build. src. display( ) , map_to) ,
1053- ) ;
1047+ cargo. env ( "RUSTC_DEBUGINFO_MAP" , format ! ( "library/={map_to}/library" ) ) ;
10541048 }
10551049 }
10561050 }
You can’t perform that action at this time.
0 commit comments