bazel: create rules for precompile srcs/hdrs.
Create two Bazel rules to publish the precompile source and header files.
These are currently unreferenced by other Bazel rules, but are needed to
generate the skia_precompile_sources and skia_precompile_public file
lists in //gn/core.gni, which currently exposes them.
Bug: skia:13485
Change-Id: I9eef76fef0490a70a36d93e664432d9ee80333bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/567477
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/include/core/BUILD.bazel b/include/core/BUILD.bazel
index 23dcf70..1959e50 100644
--- a/include/core/BUILD.bazel
+++ b/include/core/BUILD.bazel
@@ -4,6 +4,15 @@
exports_files_legacy()
+# Mapped to skia_precompile_public variable in //gn/core.gni.
+filegroup(
+ name = "precompile_public_hdrs",
+ srcs = [
+ "SkCombinationBuilder.h",
+ ],
+ visibility = ["//include:__pkg__"],
+)
+
filegroup(
name = "public_hdrs",
srcs = [
diff --git a/src/core/BUILD.bazel b/src/core/BUILD.bazel
index a193631..ec654a4 100644
--- a/src/core/BUILD.bazel
+++ b/src/core/BUILD.bazel
@@ -419,6 +419,19 @@
files = SKSL_FILES,
)
+# Mapped to skia_precompile_sources variable in //gn/core.gni.
+PRECOMPILE_FILES = [
+ "SkCombinationBuilder.cpp",
+ "SkFactoryFunctions.cpp",
+ "SkFactoryFunctions.h",
+ "SkPrecompile.h",
+]
+
+split_srcs_and_hdrs(
+ name = "precompile",
+ files = PRECOMPILE_FILES,
+)
+
filegroup(
name = "srcs",
srcs = [":core_srcs"] + select({