Add support for --env on tracked_env::var

This commit is contained in:
Guillaume Gomez 2023-12-11 16:44:18 +01:00
parent 6f40082313
commit 6ce2fefea6
3 changed files with 7 additions and 1 deletions

View file

@ -426,6 +426,10 @@ impl server::Types for Rustc<'_, '_> {
}
impl server::FreeFunctions for Rustc<'_, '_> {
fn injected_env_var(&mut self, var: &str) -> Option<String> {
self.ecx.sess.opts.logical_env.get(var).cloned()
}
fn track_env_var(&mut self, var: &str, value: Option<&str>) {
self.sess()
.env_depinfo