Add //visibility:any_partition

When we convert the partitions to be built with soong, there will
likely be separate partition modules per product. This means that a
lot of installable modules will have to be visible to a lot of
partitions. To make this easier, add the //visibility:any_partition
visibility spec, which allows the module to be used from any module
of type android_filesystem or android_system_image.

Fixes: 321000103
Test: go test
Change-Id: Iea1f1ab7d88dfdb1fd00f19eb8c9941693a2375f
This commit is contained in:
Cole Faust
2024-02-07 11:28:26 -08:00
parent 617b3e288a
commit 894bb3b530
4 changed files with 104 additions and 37 deletions

View File

@@ -314,6 +314,9 @@ subpackages) can use this module.
* `["//visibility:override"]`: Discards any rules inherited from defaults or a
creating module. Can only be used at the beginning of a list of visibility
rules.
* `["//visibility:any_partition"]`: Any modules of type android_filesystem
or android_system_image can use this module. Intended for modules that no one
should link against, but should still be included in soong-built partitions.
* `["//some/package:__pkg__", "//other/package:__pkg__"]`: Only modules in
`some/package` and `other/package` (defined in `some/package/*.bp` and
`other/package/*.bp`) have access to this module. Note that sub-packages do not