Commit graph

6 commits

Author SHA1 Message Date
Chris Parsons
637458d326 Have ConvertWBp2build use Bp2buildMutatorContext
This no-op refactoring facilitates some upcoming functional changes for
"bp2build allowlist v2". The work requires that the bp2build conversion
mutator be changed from a TopDown mutator to a BottomUp mutator.
Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext
makes it easier to make this functional change without touching tens of
files and multiple projects.

Bug: 285631638
Test: m bp2build
Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
2023-09-20 14:49:35 +00:00
Colin Cross
c85750bfe3 Use generics for DepSets
Use Go's generics for DepSets so they don't require a type-specific
wrapper and reflection.

Test: depsets_test.go
Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
2023-06-22 08:18:33 -07:00
Vinh Tran
095819530a Sandbox inputs to aidl rule in cc
Bug: 279960133
Test: go test
Test: Remove hdrs prop from IDropBoxManagerService_aidl && run  BUILD_BROKEN_DISABLE_BAZEL=true m libservices && Expect an error from aidl
Change-Id: Ifdb260d8e2da9a5767f1e212393de4134b210616
2023-05-23 15:53:10 -04:00
Vinh Tran
367d89da78 Use aidl_library in cc libraries
Introduce aidl.libs prop on cc libraries to pass in aidl_library. The goal is to eventually disallow aidl.include_dirs (a pattern for passing aidl headers dir for aidl compilation) and enforce aidl headers to be explicitly specified in Android.bp.

Bug: 278704136
Test: go test
Change-Id: Ia78bc11dfa12f47d2d1bb90dc65372ddb17f7e14
2023-05-15 17:09:22 -04:00
Vinh Tran
3d16990b29 Implement bp2build converter for aidl_library
Test: go test
Bug: 278704136
Change-Id: Ia9c3772257af58e1de9041ba465130740b555fe4
2023-05-11 11:39:43 -04:00
Vinh Tran
0e7fd8a14b Implement aidl_library module type
We currently specifies aidl files directly to the srcs prop on a filegroup or other module types such as cc_library or java_library. We use aidl.include_dirs prop to specify paths to aidl headers. This include_dirs pattern isn't migratable to Bazel because Bazel requires explicit dependencies.

This CL introduces aidl_library to better map with Bazel's aidl_library rule and to enable aidl headers to be specified in a separate aidl_library or the hdrs prop. A follow-up CL will turn on inputs sandbox to enforce all aidl headers be explicitly specified in Android.bp

Test: go test
Bug: 278704136
Change-Id: I2c99af080525bf8a6c5724ed5ee2001842969098
2023-05-10 16:46:20 -04:00