File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1310,10 +1310,16 @@ fn trim_paths_args(
13101310/// This remap logic aligns with rustc:
13111311/// <https://github.com/rust-lang/rust/blob/c2ef3516/src/bootstrap/src/lib.rs#L1113-L1116>
13121312fn sysroot_remap ( build_runner : & BuildRunner < ' _ , ' _ > , unit : & Unit ) -> OsString {
1313- let sysroot = & build_runner. bcx . target_data . info ( unit. kind ) . sysroot ;
13141313 let mut remap = OsString :: from ( "--remap-path-prefix=" ) ;
1315- remap. push ( sysroot) ;
1316- remap. push ( "/lib/rustlib/src/rust" ) ; // See also `detect_sysroot_src_path()`.
1314+ remap. push ( {
1315+ // See also `detect_sysroot_src_path()`.
1316+ let mut sysroot = build_runner. bcx . target_data . info ( unit. kind ) . sysroot . clone ( ) ;
1317+ sysroot. push ( "lib" ) ;
1318+ sysroot. push ( "rustlib" ) ;
1319+ sysroot. push ( "src" ) ;
1320+ sysroot. push ( "rust" ) ;
1321+ sysroot
1322+ } ) ;
13171323 remap. push ( "=" ) ;
13181324 remap. push ( "/rustc/" ) ;
13191325 if let Some ( commit_hash) = build_runner. bcx . rustc ( ) . commit_hash . as_ref ( ) {
You can’t perform that action at this time.
0 commit comments