I am trying to query the list of Bazel targets having public visibility. Some of our Bazel targets have visibility
specified explicitly, e.g.:
cc_library(
name = "xxx_util",
visibility = ["//visibility:public",],
...
)
while most targets are implicitly public, as their BUILD
files have default public visibility specified, e.g.
package(default_visibility = ["//visibility:public"])
I need a list of all such targets, so that I can copy their output to a certain location automatically after my Bazel workspace is built.
I am new to Bazel and can't figure out the query...