6ba9f702ba
To make the atomic rules a bit easier to work with, in many of the folders, this adds in cc_library rules to group together the sources from that folder (and subfolders where prudent). We only needs sources because those atoms should have their headers as deps. One issue that was pointed out is that there is currently no way to restrict the inclusion of certain packages, a la, `gn check`. For example, there is no mechanism from stopping a dev from adding #include "modules/canvaskit/WasmCommon.h" to something in //src/core (except circular dependencies). We can probably address that using Bazel's visibility rules as needed: https://docs.bazel.build/versions/main/visibility.html https://docs.bazel.build/versions/main/be/functions.html#package_group It is recommended to look at this CL patchset by patchset. PS1: Update gazelle command to generate rules in more folders. PS2: A few changes to make generation work better. PS3: The result of running make generate in //bazel PS4: Adding the rules to build sksllex, the simplest binary I could find in the Skia repo. PS5: Adding the rules to build skdiff, a more complex binary. I tried a few approaches, but ended up gravitating back towards the layout where we have each folder/package group up the sources. I imagine at some point, we'll have skdiff depend on skia_core or something, which will have things like //src/core, //src/codecs, //src/pathops all bundled together. PS7: Added in the groupings of sources, similar to what we had earlier. I liked these for readability. These helped fix up the //:skia_core build, and by extension, the CanvasKit build. Change-Id: I3faa7c4e821c876b243617aacf0246efa524cbde Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/476219 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
39 lines
899 B
Python
39 lines
899 B
Python
load("//bazel:macros.bzl", "generated_cc_atom")
|
|
|
|
generated_cc_atom(
|
|
name = "D3DTestContext_hdr",
|
|
hdrs = ["D3DTestContext.h"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//include/gpu/d3d:GrD3DBackendContext_hdr",
|
|
"//tools/gpu:TestContext_hdr",
|
|
],
|
|
)
|
|
|
|
generated_cc_atom(
|
|
name = "D3DTestContext_src",
|
|
srcs = ["D3DTestContext.cpp"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
":D3DTestContext_hdr",
|
|
":D3DTestUtils_hdr",
|
|
"//include/gpu:GrDirectContext_hdr",
|
|
],
|
|
)
|
|
|
|
generated_cc_atom(
|
|
name = "D3DTestUtils_hdr",
|
|
hdrs = ["D3DTestUtils.h"],
|
|
visibility = ["//:__subpackages__"],
|
|
)
|
|
|
|
generated_cc_atom(
|
|
name = "D3DTestUtils_src",
|
|
srcs = ["D3DTestUtils.cpp"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
":D3DTestUtils_hdr",
|
|
"//include/gpu/d3d:GrD3DBackendContext_hdr",
|
|
],
|
|
)
|