Skip to content

Commit

Permalink
Make cargo export CARGO_TARGET_DIR to build.rs scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Sep 3, 2019
1 parent 49fbf52 commit de852c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cargo/core/compiler/custom_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes
let debug = unit.profile.debuginfo.unwrap_or(0) != 0;
cmd.env("OUT_DIR", &script_out_dir)
.env("CARGO_MANIFEST_DIR", unit.pkg.root())
.env("CARGO_TARGET_DIR", bcx.ws.target_dir())
.env("NUM_JOBS", &bcx.jobs().to_string())
.env(
"TARGET",
Expand Down

0 comments on commit de852c2

Please sign in to comment.