diff --git a/rutabaga_gfx/Android.bp b/rutabaga_gfx/Android.bp index 4c2823c2eb..29b565c666 100644 --- a/rutabaga_gfx/Android.bp +++ b/rutabaga_gfx/Android.bp @@ -23,7 +23,6 @@ rust_library { edition: "2021", features: [ "gfxstream", - "gfxstream_stub", "virgl_renderer", ], rustlibs: [ @@ -38,9 +37,41 @@ rust_library { "libzerocopy", ], proc_macros: ["libremain"], - static_libs: ["libvirglrenderer"], - shared_libs: ["libepoxy"], + static_libs: [ + "libepoxy", + "libvirglrenderer", + ], apex_available: ["com.android.virt"], + cfgs: [ + "gfxstream_unstable", + ], + target: { + android: { + shared_libs: [ + "libbase", + "libc++", + "libcutils", + "liblog", + "libnativewindow", + ], + static_libs: [ + "libgfxstream_backend", + ], + rustlibs: [ + "libnativewindow_bindgen", + "libnativewindow_rs", + ], + }, + host: { + features: ["vulkano"], + shared_libs: [ + "libgfxstream_backend", + ], + rustlibs: [ + "libvulkano", + ], + }, + }, } rust_test { @@ -59,7 +90,6 @@ rust_test { edition: "2021", features: [ "gfxstream", - "gfxstream_stub", "virgl_renderer", ], rustlibs: [ @@ -75,8 +105,28 @@ rust_test { "libzerocopy", ], proc_macros: ["libremain"], - static_libs: ["libvirglrenderer"], - shared_libs: ["libepoxy"], + static_libs: [ + "libepoxy", + "libgfxstream_backend", + "libvirglrenderer", + ], + shared_libs: [ + "libc++", + "libbase", + ], + target: { + android: { + shared_libs: [ + "libnativewindow", + "libcutils", + "liblog", + ], + rustlibs: [ + "libnativewindow_bindgen", + "libnativewindow_rs", + ], + }, + }, } // Manually written variant of librutabaga_gfx. @@ -125,6 +175,10 @@ rust_library { "fence_passing_option1", "gfxstream_unstable", ], + rustlibs: [ + "libnativewindow_bindgen", + "libnativewindow_rs", + ], }, }, apex_available: ["com.android.virt"],