Skip to content

Commit

Permalink
Merge #310
Browse files Browse the repository at this point in the history
310: Fix copy failure by overriding CARGO_TARGET_DIR r=RalfJung a=oxalica

Fixes #286 

According to @RalfJung (#286 (comment)). It's better to use default `target`. So we just need to explicit override the target directory to fix the copy failure.

> xargo has its own workspace for building libstd. There is no interaction whatsoever with the workspace of your project. That's why I keep saying xargo should just overwrite the target dir.

Co-authored-by: oxalica <[email protected]>
  • Loading branch information
bors[bot] and oxalica authored Jan 16, 2021
2 parents 1756d39 + 54bf376 commit 23c6fd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sysroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ version = "0.0.0"
writeln!(io::stderr(), "+ RUSTFLAGS={:?}", flags).ok();
}
cmd.env("RUSTFLAGS", flags);
cmd.env_remove("CARGO_TARGET_DIR");

// Since we currently don't want to respect `.cargo/config` or `CARGO_TARGET_DIR`,
// we need to force the target directory to match the `cp_r` below.
cmd.env("CARGO_TARGET_DIR", td.join("target"));

// Workaround #261.
//
Expand Down

0 comments on commit 23c6fd2

Please sign in to comment.