Inject BAZEL_CURRENT_REPOSITORY into cuda_library - #474
Merged
cloudhan merged 2 commits intoMay 18, 2026
Conversation
Bazel's native cc_library passes BAZEL_CURRENT_REPOSITORY as a private define so runfiles helpers (e.g. @bazel_tools//tools/cpp/runfiles) can resolve the owning repo at compile time. cuda_library skipped this, which broke any cuda TU that pulls in those headers transitively. Signed-off-by: Austin Schuh <austin.linux@gmail.com>
Contributor
Author
|
bazelbuild/bazel@1b214d2 has the rules_cc piece if that is helpful. |
Collaborator
|
Great, previously, we need to support bazel with older version (< 7.0), many cc rule's functions cannot be used. But since the phasing out of 6.4 from bazel offical support matrix (Dec 2025), I remove the v6.4 from our CI, I think we can just safely merge it. |
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.
Bazel's native cc_library passes BAZEL_CURRENT_REPOSITORY as a private define so runfiles helpers (e.g. @bazel_tools//tools/cpp/runfiles) can resolve the owning repo at compile time. cuda_library skipped this, which broke any cuda TU that pulls in those headers transitively.