Skip to content

Commit

Permalink
Add new workaround target due to bazelbuild/bazel#21519
Browse files Browse the repository at this point in the history
Previously, the only failure case was XLA depending on TSL header accessed via `filegroup` or `exports_files`. The new target stops the reverse where TSL depends on XLA. We can delete this post TSL move.

PiperOrigin-RevId: 696991269
  • Loading branch information
ddunl authored and Google-ML-Automation committed Nov 15, 2024
1 parent 195f45b commit 73a0b89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions third_party/tsl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ license(
package_name = "tsl",
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
)

cc_library(
name = "empty",
visibility = ["//visibility:public"],
)

# Needed to workaround https://github.com/bazelbuild/bazel/issues/21519
alias(
name = "bazel_issue_21519",
actual = ":empty",
visibility = ["//visibility:public"],
)
1 change: 1 addition & 0 deletions third_party/tsl/tsl/platform/default/rules_cc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ def cc_library(name, deps = None, **kwargs):
# alias of `empty`.
if name != "empty":
deps = deps + ["@xla//xla/tsl:bazel_issue_21519"] # buildifier: disable=list-append
deps = deps + ["@tsl//:bazel_issue_21519"] # buildifier: disable=list-append

native.cc_library(name = name, deps = deps, **kwargs)

0 comments on commit 73a0b89

Please sign in to comment.