File tree 1 file changed +9
-3
lines changed
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(
1310
1310
/// This remap logic aligns with rustc:
1311
1311
/// <https://github.com/rust-lang/rust/blob/c2ef3516/src/bootstrap/src/lib.rs#L1113-L1116>
1312
1312
fn sysroot_remap ( build_runner : & BuildRunner < ' _ , ' _ > , unit : & Unit ) -> OsString {
1313
- let sysroot = & build_runner. bcx . target_data . info ( unit. kind ) . sysroot ;
1314
1313
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
+ } ) ;
1317
1323
remap. push ( "=" ) ;
1318
1324
remap. push ( "/rustc/" ) ;
1319
1325
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