Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Set missing env vars from Cargo in a compilation step
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Jun 4, 2017
1 parent a62fb6e commit 94d77d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/build.rs
Expand Up @@ -357,6 +357,9 @@ impl BuildQueue {
cmd_dep_info.arg(a);
}
}
// Compilation may depend on env vars which Cargo sets during compile-time
cmd_dep_info.envs(cmd.get_envs().iter().filter_map(|(k, v)| v.as_ref().map(|v| (k, v))));

if let Some(cwd) = cmd.get_cwd() {
cmd_dep_info.current_dir(cwd);
}
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Expand Up @@ -10,6 +10,7 @@

#![feature(rustc_private)]
#![feature(concat_idents)]
#![feature(command_envs)]

extern crate cargo;
#[macro_use]
Expand Down

0 comments on commit 94d77d6

Please sign in to comment.