feat: declare shorten_virtual_includes as a known toolchain feature#3
Open
Reflexe wants to merge 1 commit into
Open
feat: declare shorten_virtual_includes as a known toolchain feature#3Reflexe wants to merge 1 commit into
Reflexe wants to merge 1 commit into
Conversation
rules_cc gates a path-shortening branch on
feature_configuration.is_enabled("shorten_virtual_includes") at
https://github.com/bazelbuild/rules_cc/blob/0.2.18/cc/private/compile/cc_compilation_helper.bzl#L421.
When set, the if/else at #L127-L130 of the same file replaces the long
bazel-out/.../_virtual_includes/<package>/<label>/... directory emitted
by cc_library(strip_include_prefix=...) with a fixed-width hex hash.
Without the feature declared in :all_known_features the toggle is
silently a no-op, and Windows consumers hit cl.exe D8022 / MAX_PATH on
deep include chains (proto-generated code, BCR grpc / protobuf / envoy_api).
Off by default; opt in via --features=shorten_virtual_includes,
--host_features=..., or toolchain_set(features=[...]).
Author
|
On a personal note, wanted to thank you a lot for your work on this project, it is very cool! I am evaluating its usage within my team (at Entra) as an experimental build flavor. Feel free to reach out if I can help with anything. Thanks a lot again, good luck. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
rules_cc gates a path-shortening branch on
feature_configuration.is_enabled("shorten_virtual_includes") at https://github.com/bazelbuild/rules_cc/blob/0.2.18/cc/private/compile/cc_compilation_helper.bzl#L421. When set, the if/else at #L127-L130 of the same file replaces the long bazel-out/.../_virtual_includes///... directory emitted by cc_library(strip_include_prefix=...) with a fixed-width hex hash. Without the feature declared in :all_known_features the toggle is silently a no-op, and Windows consumers hit cl.exe D8022 / MAX_PATH on deep include chains (proto-generated code, BCR grpc / protobuf / envoy_api).
Off by default; opt in via --features=shorten_virtual_includes, --host_features=..., or toolchain_set(features=[...]).