Skip to content

Add requires_not_none support for cc_args.env#484

Closed
keith wants to merge 2 commits into
bazelbuild:mainfrom
keith:ks/add-requires_not_none-support-for-cc_args.env
Closed

Add requires_not_none support for cc_args.env#484
keith wants to merge 2 commits into
bazelbuild:mainfrom
keith:ks/add-requires_not_none-support-for-cc_args.env

Conversation

@keith

@keith keith commented Sep 5, 2025

Copy link
Copy Markdown
Member

Since this commit
5a8cab7
bazel has supported expand_if_available for env_sets. This is useful
when it's easier in the tool being run to accept optional arguments via
environment variables vs potentially double parsing and filtering
arguments.

For example in the case of parse_headers actions you either have to
parse the command line (including optional response files) in order to
find the value passed to -o, or you can organize it so you can read
it from the environment instead with this.

Since this commit
bazelbuild@5a8cab7
bazel has supported expand_if_available for env_sets. This is useful
when it's easier in the tool being run to accept optional arguments via
environment variables vs potentially double parsing and filtering
arguments.

For example in the case of parse_headers actions you either have to
parse the command line (including optional response files) in order to
find the value passed to `-o`, or you can organize it so you can read
it from the environment instead with this.
@keith

keith commented Sep 5, 2025

Copy link
Copy Markdown
Member Author

PTAL @reutermj @matts1

@keith

keith commented Sep 5, 2025

Copy link
Copy Markdown
Member Author

an example of this type of change in an old style toolchain bazelbuild/apple_support#429

@matts1 matts1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@copybara-service copybara-service Bot closed this in db1d07d Sep 8, 2025
@keith keith deleted the ks/add-requires_not_none-support-for-cc_args.env branch September 8, 2025 15:56
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