diff --git a/tools/BUILD b/tools/BUILD index 0f69e23505fc27..f8af8a9e711ecb 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -87,6 +87,7 @@ filegroup( "//tools/jdk:bzl_srcs", "//tools/osx:bzl_srcs", "//tools/python:bzl_srcs", + "//tools/runfiles:bzl_srcs", "//tools/sh:bzl_srcs", "//tools/test:bzl_srcs", "//tools/windows:bzl_srcs", diff --git a/tools/runfiles/BUILD b/tools/runfiles/BUILD index 739336793ec972..7bf821a2256de6 100644 --- a/tools/runfiles/BUILD +++ b/tools/runfiles/BUILD @@ -11,6 +11,9 @@ filegroup( filegroup( name = "embedded_tools", - srcs = ["BUILD.tools"], + srcs = [ + "BUILD.tools", + "runfiles.bzl", + ], visibility = ["//tools:__pkg__"], ) diff --git a/tools/runfiles/BUILD.tools b/tools/runfiles/BUILD.tools index 3f0073a37079af..995c166c35b7a7 100644 --- a/tools/runfiles/BUILD.tools +++ b/tools/runfiles/BUILD.tools @@ -1,6 +1,12 @@ +package(default_visibility = ["//visibility:private"]) + java_library( name = "java-runfiles", deprecation = "Depend on @bazel_tools//tools/java/runfiles instead. This target will be deleted in Bazel 0.19.0", - visibility = ["//visibility:public"], exports = ["//tools/java/runfiles"], ) + +filegroup( + name = "bzl_srcs", + srcs = ["runfiles.bzl"], +) diff --git a/tools/runfiles/runfiles.bzl b/tools/runfiles/runfiles.bzl new file mode 100644 index 00000000000000..2d0830cbd2be86 --- /dev/null +++ b/tools/runfiles/runfiles.bzl @@ -0,0 +1,9 @@ +RunfilesLibraryInfo = provider( + doc = """ +A marker for targets providing runfiles lookup functionality. + +Rules may choose to emit additional information required to locate runfiles at runtime if this provider is present on a direct dependency. + +Note: At this point, neither Bazel nor native rules check for the presence of this provider. +""", +) \ No newline at end of file