Skip to content

Inject BAZEL_CURRENT_REPOSITORY into cuda_library - #474

Merged
cloudhan merged 2 commits into
bazel-contrib:mainfrom
AustinSchuh:bazel_current_repository
May 18, 2026
Merged

Inject BAZEL_CURRENT_REPOSITORY into cuda_library#474
cloudhan merged 2 commits into
bazel-contrib:mainfrom
AustinSchuh:bazel_current_repository

Conversation

@AustinSchuh

Copy link
Copy Markdown
Contributor

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.

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>
@AustinSchuh

Copy link
Copy Markdown
Contributor Author

bazelbuild/bazel@1b214d2 has the rules_cc piece if that is helpful.

@cloudhan

Copy link
Copy Markdown
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.

@cloudhan
cloudhan merged commit 12e31c9 into bazel-contrib:main May 18, 2026
23 checks passed
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