Internal change
PiperOrigin-RevId: 340301767
Change-Id: Iccab5010d3fd6e77c08fcdc140cdc1e461185b0d
diff --git a/BUILD b/BUILD
index 5e0fc3a..cdaf96f 100644
--- a/BUILD
+++ b/BUILD
@@ -1,3 +1,5 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
@@ -14,3 +16,15 @@
],
visibility = ["@//distro:__pkg__"],
)
+
+bzl_library(
+ name = "internal_deps_bzl",
+ srcs = ["internal_deps.bzl"],
+ visibility = ["//visibility:private"],
+)
+
+bzl_library(
+ name = "internal_setup_bzl",
+ srcs = ["internal_setup.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/examples/BUILD b/examples/BUILD
index 0bfcd24..c770074 100644
--- a/examples/BUILD
+++ b/examples/BUILD
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
# A collection of examples showing the usage of rules_cc
@@ -28,3 +29,9 @@
build_setting_default = False,
visibility = ["//visibility:public"],
)
+
+bzl_library(
+ name = "experimental_cc_shared_library_bzl",
+ srcs = ["experimental_cc_shared_library.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/examples/my_c_archive/BUILD b/examples/my_c_archive/BUILD
index 59bcd56..4484684 100644
--- a/examples/my_c_archive/BUILD
+++ b/examples/my_c_archive/BUILD
@@ -14,6 +14,7 @@
# Example showing how to create a custom Starlark rule that rules_cc can depend on
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//examples/my_c_archive:my_c_archive.bzl", "my_c_archive")
load("//examples/my_c_compile:my_c_compile.bzl", "my_c_compile")
@@ -41,3 +42,9 @@
name = "bar",
srcs = ["bar.c"],
)
+
+bzl_library(
+ name = "my_c_archive_bzl",
+ srcs = ["my_c_archive.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/examples/my_c_compile/BUILD b/examples/my_c_compile/BUILD
index efcabf4..b045509 100644
--- a/examples/my_c_compile/BUILD
+++ b/examples/my_c_compile/BUILD
@@ -1,3 +1,4 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//examples/my_c_compile:my_c_compile.bzl", "my_c_compile")
# Copyright 2019 The Bazel Authors. All rights reserved.
@@ -21,3 +22,9 @@
name = "foo",
src = "foo.c",
)
+
+bzl_library(
+ name = "my_c_compile_bzl",
+ srcs = ["my_c_compile.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/examples/test_cc_shared_library/BUILD b/examples/test_cc_shared_library/BUILD
index 027717c..5f3d03b 100644
--- a/examples/test_cc_shared_library/BUILD
+++ b/examples/test_cc_shared_library/BUILD
@@ -1,3 +1,4 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load("//examples:experimental_cc_shared_library.bzl", "LINKABLE_MORE_THAN_ONCE", "cc_shared_library")
load(":starlark_tests.bzl", "additional_inputs_test", "build_failure_test", "linking_suffix_test", "paths_test")
@@ -195,3 +196,9 @@
message = "can only list targets that are in the same package or a sub-package",
target_under_test = "//examples/test_cc_shared_library/failing_targets:permissions_fail",
)
+
+bzl_library(
+ name = "test_cc_shared_library_starlark_tests_bzl",
+ srcs = ["starlark_tests.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/examples/write_cc_toolchain_cpu/BUILD b/examples/write_cc_toolchain_cpu/BUILD
index fcee153..c9ee72f 100644
--- a/examples/write_cc_toolchain_cpu/BUILD
+++ b/examples/write_cc_toolchain_cpu/BUILD
@@ -1,3 +1,4 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//examples/write_cc_toolchain_cpu:write_cc_toolchain_cpu.bzl", "write_cc_toolchain_cpu")
# Copyright 2019 The Bazel Authors. All rights reserved.
@@ -18,3 +19,9 @@
licenses(["notice"])
write_cc_toolchain_cpu(name = "write_me_the_cpu")
+
+bzl_library(
+ name = "write_cc_toolchain_cpu_bzl",
+ srcs = ["write_cc_toolchain_cpu.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/tests/load_from_macro/BUILD b/tests/load_from_macro/BUILD
index 7084344..93b902a 100644
--- a/tests/load_from_macro/BUILD
+++ b/tests/load_from_macro/BUILD
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//cc:defs.bzl", "cc_library")
load(":tags.bzl", "TAGS")
@@ -22,3 +23,9 @@
srcs = ["foo.cc"],
tags = TAGS,
)
+
+bzl_library(
+ name = "tags_bzl",
+ srcs = ["tags.bzl"],
+ visibility = ["//visibility:private"],
+)
diff --git a/tools/migration/BUILD b/tools/migration/BUILD
index 0cef4ae..443299b 100644
--- a/tools/migration/BUILD
+++ b/tools/migration/BUILD
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
# Go rules
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
@@ -131,3 +133,15 @@
)
exports_files(["ctoolchain_compare.bzl"])
+
+bzl_library(
+ name = "ctoolchain_compare_bzl",
+ srcs = ["ctoolchain_compare.bzl"],
+ visibility = ["//visibility:private"],
+)
+
+bzl_library(
+ name = "cc_toolchain_config_comparator_bzl",
+ srcs = ["cc_toolchain_config_comparator.bzl"],
+ visibility = ["//visibility:private"],
+)