Skip to content
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

Filter environment variables when building with Bazel #3075

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

brentleyjones
Copy link
Contributor

In order for Xcode builds to work with custom environment variables you need to use xcodeproj.bazel_env. This just takes the extra step of filtering out all other environment variables, ensuring more analysis cache hits. You can already do this in your own tools/bazel, but now people can get the benefit regardless.

This change is needed for shared outputs bases to be performant.

@thiagohmcruz thiagohmcruz self-requested a review August 19, 2024 20:26
@brentleyjones brentleyjones force-pushed the bj/filter-env-more branch 2 times, most recently from 3bc7c61 to 83c0791 Compare August 19, 2024 20:29
@brentleyjones brentleyjones enabled auto-merge (squash) August 20, 2024 12:33
In order for Xcode builds to work with custom environment variables you need to use `xcodeproj.bazel_env`. This just takes the extra step of filtering out all other environment variables, ensuring more analysis cache hits. You can already do this in your own `tools/bazel`, but now people can get the benefit regardless.

This change is needed for shared outputs bases to be performant.

Signed-off-by: Brentley Jones <[email protected]>
@brentleyjones brentleyjones merged commit 1588079 into main Aug 20, 2024
15 of 16 checks passed
@brentleyjones brentleyjones deleted the bj/filter-env-more branch August 20, 2024 12:36
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.

3 participants