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

Set missing env vars from Cargo in a compilation step #337

Merged
merged 1 commit into from Jun 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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