-
Notifications
You must be signed in to change notification settings - Fork 248
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
Restrict use of use_default_shell_env
to windows.
#647
Conversation
f3a8132
to
268e54f
Compare
foreign_cc/private/framework.bzl
Outdated
env = dict(ctx.configuration.default_shell_env) | ||
|
||
# Add all environment variables from the cc_toolchain | ||
cc_env = _correct_path_variable(get_env_vars(ctx)) | ||
env.update(cc_env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the same way that the environment gets overridden for the native cc_*
rules? I would guess that the behaviour is the opposite way around i.e. action_env
overrides variables defined by the toolchain but 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, action_env
should probably take precedence. I'll update this.
Co-authored-by: James Sharpe <[email protected]>
The primary intent of this change is to have a more structured way of controlling the environment. The way it's currently implemented adds support for --action_env to MacOS platforms and adds a centralized place in code to manage environment variables.