Skip to content

collector: passthrough env vars #674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

davidtwco
Copy link
Member

@davidtwco davidtwco commented Jun 23, 2020

This PR modifies the collector to stop clearing the environment when invoking the fake rustc.

This is helpful for users of Nix development shells where environment variables are required to inform tools of the location of C dependencies, and for setting RUSTFLAGS to collect data from the same build with different flags.

However, this change can result in some environment variables affecting the data collection where that isn't intended.

This commit modifies the collector to stop clearing the environment when
invoking the fake rustc.

This is helpful for users of Nix development shells where environment
variables are required to inform tools of the location of C
dependencies, and for setting RUSTFLAGS to collect data from the same
build with different flags.

However, this change can result in some environment variables affecting
the data collection where that isn't intended.

Signed-off-by: David Wood <[email protected]>
@Mark-Simulacrum
Copy link
Member

I'm going to go ahead and merge this -- I think it's probably the right thing to do. I wonder if we should instead have some sort of "allowed env list" in the arguments passed to the executable... but that seems pretty annoying for users who do want some stable set of env variables.

@Mark-Simulacrum Mark-Simulacrum merged commit 75936b2 into rust-lang:master Jun 26, 2020
@davidtwco davidtwco deleted the collector-env-passthrough branch July 3, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants