drm_hwcomposer: Define cc_defaults for hwc3 binary Some vendors do not use gralloc4 and can't use the BufferInfoGetter implemented on top of the IMapper 4 API. These vendors use a LegacyBufferInfoGetter implementation, and need to define a new build target for it. Move the majority of the configuration for the hwc3 service to a cc_defaults target, so that this can be referenced downstream and reduce duplication. Change-Id: I2561ecbb2d3c520f8cd8bdbf171a28d5f7fb1a51 Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/Android.bp b/Android.bp index f358265..d6994ac 100644 --- a/Android.bp +++ b/Android.bp
@@ -163,14 +163,13 @@ ], } -cc_binary { - name: "android.hardware.composer.hwc3-service.drm", +cc_defaults { + name: "android.hardware.composer.hwc3-service.drm.defaults", srcs: [ ":drm_hwcomposer_common", ":drm_hwcomposer_hwc3", ":drm_hwcomposer_service", - "bufferinfo/legacy/BufferInfoLibdrm.cpp", ], defaults: [ @@ -186,16 +185,25 @@ ], cflags: [ + "-DUSE_IMAPPER4_METADATA_API", "-Wall", "-Werror", - - "-DUSE_IMAPPER4_METADATA_API", ], cppflags: [ "-DHWC2_INCLUDE_STRINGIFICATION", "-DHWC2_USE_CPP11", ], +} + +cc_binary { + name: "android.hardware.composer.hwc3-service.drm", + + defaults: [ + "android.hardware.composer.hwc3-service.drm.defaults", + ], + + srcs: ["bufferinfo/legacy/BufferInfoLibdrm.cpp"], relative_install_path: "hw", vendor: true,