[CI] Reduce Windows debug binary size #1619
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This resolves CI failures due to running out of disk space, at least for
the near term. Also drops a flag modifying features for windows_no_dbg,
disabling optimizations when building for the host configuration is not
necessary.
I picked common MSVC flags that are safe to use with debug info here. When I last measured this, the bazel output + cache takes up 60GB with this on a fully cached Windows-debug build whereas the build previously ran out of space upon reaching 70GB. Based on those numbers this is just a short-term fix unfortunately, a larger improvement would be possible by changing cache behavior (70GB is only reached when binaries are duplicated between disk cache and regular bazel output) or by patching bazel to make opting out of PDB generation possible.