File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1029,7 +1029,8 @@ def build_bootstrap_cmd(self, env):
10291029 raise Exception ("no cargo executable found at `{}`" .format (
10301030 self .cargo ()))
10311031 args = [self .cargo (), "build" , "--manifest-path" ,
1032- os .path .join (self .rust_root , "src/bootstrap/Cargo.toml" )]
1032+ os .path .join (self .rust_root , "src/bootstrap/Cargo.toml" ),
1033+ "-Zroot-dir=" + self .rust_root ]
10331034 args .extend ("--verbose" for _ in range (self .verbose ))
10341035 if self .use_locked_deps :
10351036 args .append ("--locked" )
Original file line number Diff line number Diff line change @@ -703,6 +703,9 @@ impl Builder<'_> {
703703
704704 cargo. arg ( "-j" ) . arg ( self . jobs ( ) . to_string ( ) ) ;
705705
706+ // Make cargo emit diagnostics relative to the rustc src dir.
707+ cargo. arg ( format ! ( "-Zroot-dir={}" , self . src. display( ) ) ) ;
708+
706709 // FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
707710 // Force cargo to output binaries with disambiguating hashes in the name
708711 let mut metadata = if compiler. stage == 0 {
You can’t perform that action at this time.
0 commit comments