Commit Graph

4 Commits

Author SHA1 Message Date
Vinh Tran
0358fb73e8 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
(cherry picked from https://android-review.googlesource.com/q/commit:095819530af067884e1b131d9332c8c4ace31295)
Merged-In: Ifdb260d8e2da9a5767f1e212393de4134b210616
Change-Id: Ifdb260d8e2da9a5767f1e212393de4134b210616
2023-06-06 22:50:05 +00:00
Vinh Tran
0059b69829 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
(cherry picked from https://android-review.googlesource.com/q/commit:367d89da7887825f74b0c9554b2e1b9619d94f08)
Merged-In: Ia78bc11dfa12f47d2d1bb90dc65372ddb17f7e14
Change-Id: Ia78bc11dfa12f47d2d1bb90dc65372ddb17f7e14
2023-06-06 14:33:42 +00:00
Vinh Tran
4c43b2febc Implement bp2build converter for aidl_library
Test: go test
Bug: 278704136
(cherry picked from https://android-review.googlesource.com/q/commit:3d16990b29fe2a4a8deed9769908f8496755adde)
Merged-In: Ia9c3772257af58e1de9041ba465130740b555fe4
Change-Id: Ia9c3772257af58e1de9041ba465130740b555fe4
2023-06-06 14:27:46 +00:00
Vinh Tran
46004f1511 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
(cherry picked from https://android-review.googlesource.com/q/commit:0e7fd8a14b5e1ebc2f2516639e9cea5dfdefce63)
Merged-In: I2c99af080525bf8a6c5724ed5ee2001842969098
Change-Id: I2c99af080525bf8a6c5724ed5ee2001842969098
2023-06-06 14:27:22 +00:00