skia2/include/sksl/BUILD.bazel
Kevin Lubick 9488e0237d [infra] Experiment generating BUILD.bazel files
This uses the gazelle extension from
https://skia-review.googlesource.com/c/buildbot/+/473357

Review Tips:
 - Ignore any changes to .h or .cpp files. Those have been
   pulled out into their own CLs.
 - Start with bazel/macros.bzl.
 - Read the CL with the generation code, if you haven't already.
 - Look at third_party/file_map_for_bazel.json.
 - See experimental/bazel_test for an idea of how a cc_binary
   would be made.
 - Spot check one or two of the BUILD.bazel files.

This CL generates the "atomic" rules for src/, include/ and
modules/skshaper, as a starting point.

`bazel build --config clang //include/...` works

`bazel build --config clang //src/...` starts compiling,
(which verifies that the BUILD.bazel files are all valid),
but runs into errors because not all third_party deps have
been resolved, and there are some files missing from the
toolchain still (e.g. EGL headers).

Change-Id: Ib7e0fb0efdb9f08655f06cbc56e9bb4cf416294b
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474240
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2021-11-23 18:53:16 +00:00

170 lines
3.8 KiB
Python

load("//bazel:macros.bzl", "generated_cc_atom")
generated_cc_atom(
name = "DSLBlock_hdr",
hdrs = ["DSLBlock.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
":DSLStatement_hdr",
"//include/private:SkSLDefines_hdr",
],
)
generated_cc_atom(
name = "DSLCase_hdr",
hdrs = ["DSLCase.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
":DSLStatement_hdr",
"//include/private:SkSLDefines_hdr",
],
)
generated_cc_atom(
name = "DSLCore_hdr",
hdrs = ["DSLCore.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLBlock_hdr",
":DSLCase_hdr",
":DSLExpression_hdr",
":DSLFunction_hdr",
":DSLStatement_hdr",
":DSLType_hdr",
":DSLVar_hdr",
":DSLWrapper_hdr",
":SkSLErrorReporter_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkTArray_hdr",
],
)
generated_cc_atom(
name = "DSLExpression_hdr",
hdrs = ["DSLExpression.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLWrapper_hdr",
":SkSLErrorReporter_hdr",
"//include/core:SkStringView_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkTArray_hdr",
],
)
generated_cc_atom(
name = "DSLFunction_hdr",
hdrs = ["DSLFunction.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLBlock_hdr",
":DSLExpression_hdr",
":DSLType_hdr",
":DSLVar_hdr",
":DSLWrapper_hdr",
],
)
generated_cc_atom(
name = "DSLLayout_hdr",
hdrs = ["DSLLayout.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLErrorReporter_hdr",
"//include/private:SkSLLayout_hdr",
],
)
generated_cc_atom(
name = "DSLModifiers_hdr",
hdrs = ["DSLModifiers.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLLayout_hdr",
"//include/core:SkSpan_hdr",
"//include/private:SkSLModifiers_hdr",
],
)
generated_cc_atom(
name = "DSLRuntimeEffects_hdr",
hdrs = ["DSLRuntimeEffects.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSL_hdr",
"//include/effects:SkRuntimeEffect_hdr",
],
)
generated_cc_atom(
name = "DSLStatement_hdr",
hdrs = ["DSLStatement.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLErrorReporter_hdr",
"//include/core:SkString_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLStatement_hdr",
],
)
generated_cc_atom(
name = "DSLSymbols_hdr",
hdrs = ["DSLSymbols.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
"//include/core:SkStringView_hdr",
"//include/private:SkSLString_hdr",
],
)
generated_cc_atom(
name = "DSLType_hdr",
hdrs = ["DSLType.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
":DSLModifiers_hdr",
"//include/core:SkSpan_hdr",
"//include/private:SkSLString_hdr",
],
)
generated_cc_atom(
name = "DSLVar_hdr",
hdrs = ["DSLVar.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
":DSLModifiers_hdr",
":DSLType_hdr",
],
)
generated_cc_atom(
name = "DSLWrapper_hdr",
hdrs = ["DSLWrapper.h"],
visibility = ["//:__subpackages__"],
)
generated_cc_atom(
name = "DSL_hdr",
hdrs = ["DSL.h"],
visibility = ["//:__subpackages__"],
deps = [":DSLCore_hdr"],
)
generated_cc_atom(
name = "SkSLErrorReporter_hdr",
hdrs = ["SkSLErrorReporter.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkStringView_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLString_hdr",
],
)