diff options
author | Vinh Tran <vinhdaitran@google.com> | 2022-08-09 15:38:48 -0400 |
---|---|---|
committer | Vinh Tran <vinhdaitran@google.com> | 2022-08-10 12:52:26 -0400 |
commit | 9ccb8ddfca28db83fd6d82b9fb59f7a4144ffab5 (patch) | |
tree | 76743b108ee2cef5b66903c61e2d86f3eab0497f | |
parent | b6405c7954e81e7dee295a18fc5b25ee5fed3579 (diff) | |
download | native-9ccb8ddfca28db83fd6d82b9fb59f7a4144ffab5.tar.gz |
Remove framework_native_aidl and use its child filegroups directly
Currently, `framework_native_aidl` wraps `framework_native_aidl_binder` and `framework_native_aidl_gui`. When converting cc modules with AIDL srcs to Bazel, we run into some challenges with this pattern because an AIDL filegroup module in Soong doesn't map 1-to-1 an aidl_library target in Bazel. See go/bp2build-aidl-filegroup for more details.
Instead of pursuing a more sophisticated solution to handle nested AIDL filegroups, we're proposing to flatten the filegroups directly in Android.bp since scale of the problem is small.
Doing this makes it easier to convert AIDL filegroups to Bazel for cc rules to use and doesn't change anything in how Soong builds the module.
Let me know if there is any drawback of this approach from your perspective.
Test: m libgui
Change-Id: If3c57acbcace2256d369f31a02f78601bfc9eef2
-rw-r--r-- | Android.bp | 12 | ||||
-rw-r--r-- | libs/gui/Android.bp | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp index dec6716290..615a7a8727 100644 --- a/Android.bp +++ b/Android.bp @@ -64,14 +64,20 @@ filegroup { name: "framework_native_aidl_binder", srcs: ["aidl/binder/**/*.aidl"], path: "aidl/binder", - visibility: ["//frameworks/native"], + visibility: [ + "//frameworks/native", + "//frameworks/native/libs/gui", + ], } filegroup { name: "framework_native_aidl_gui", srcs: ["aidl/gui/**/*.aidl"], path: "aidl/gui", - visibility: ["//frameworks/native"], + visibility: [ + "//frameworks/native", + "//frameworks/native/libs/gui", + ], } filegroup { @@ -82,7 +88,7 @@ filegroup { ], } -cc_library_headers{ +cc_library_headers { name: "libandroid_headers_private", export_include_dirs: ["include/private"], } diff --git a/libs/gui/Android.bp b/libs/gui/Android.bp index 6641b7777c..78731b1a7f 100644 --- a/libs/gui/Android.bp +++ b/libs/gui/Android.bp @@ -161,7 +161,8 @@ cc_library_shared { ], srcs: [ - ":framework_native_aidl", + ":framework_native_aidl_binder", + ":framework_native_aidl_gui", ":inputconstants_aidl", ":libgui_bufferqueue_sources", |