Make libRSSupport.so buildable for native bridge am: b38654cae1 am: 6c13ed1fe6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/rs/+/12494365
Change-Id: I928914485db13f2b0e90fce27769b407883a21d0
diff --git a/support.bp b/support.bp
index 1a4bd59..ca73744 100644
--- a/support.bp
+++ b/support.bp
@@ -40,11 +40,9 @@
],
}
-cc_library_shared {
- name: "libRSSupport",
+cc_defaults {
+ name: "libRSSupport_defaults",
defaults: ["rs_support_defaults"],
- sdk_version: "9",
-
srcs: [
"rsAllocation.cpp",
"rsApiAllocation.cpp",
@@ -185,6 +183,12 @@
// Allow implicit fallthrough in rsContext.cpp:414 until it is fixed.
"-Wno-error=implicit-fallthrough",
],
+}
+
+cc_library_shared {
+ name: "libRSSupport",
+ defaults: ["libRSSupport_defaults"],
+ sdk_version: "9",
target: {
platform: {
@@ -192,3 +196,30 @@
},
},
}
+
+// Note: libnative_bridge_guest libraries don't support "sdk_version" - and we
+// must use libnative_bridge_guest_libnativewindow instead of libnativewindow
+// when we are doing native_bridge build.
+cc_library_shared {
+ name: "libnative_bridge_guest_libRSSupport",
+ stem: "libRSSupport",
+ defaults: ["libRSSupport_defaults"],
+
+ // Import headers not provided by libnative_bridge_guest_libnativewindow.
+ header_libs: [
+ "libarect_headers",
+ "libnativewindow_headers"
+ ],
+
+ shared_libs: [
+ "libnative_bridge_guest_libnativewindow",
+ ],
+
+ enabled: false,
+ native_bridge_supported: true,
+ target: {
+ native_bridge: {
+ enabled: true,
+ }
+ },
+}