Statically link missing libary to SurfaceFlinger_test
Some targets do not have the libary in their system or
vendor image so the test fails to run.
Fixes: 169975342
Test: m SurfaceFlinger_test
Test: Treehugger run on cf_x86_64_phone-userdebug
Change-Id: I9a08146468f69b22ac5b397d0d5c0f195cde972f
diff --git a/services/surfaceflinger/layerproto/Android.bp b/services/surfaceflinger/layerproto/Android.bp
index d03cb7b..0a73b23 100644
--- a/services/surfaceflinger/layerproto/Android.bp
+++ b/services/surfaceflinger/layerproto/Android.bp
@@ -1,5 +1,5 @@
-cc_library_shared {
- name: "liblayers_proto",
+cc_defaults {
+ name: "liblayers_proto_defaults",
export_include_dirs: ["include"],
srcs: [
@@ -19,7 +19,7 @@
proto: {
export_proto_headers: true,
},
-
+
cppflags: [
"-Werror",
"-Wno-unused-parameter",
@@ -33,7 +33,20 @@
"-Wno-old-style-cast",
"-Wno-undef",
],
+}
+cc_library_shared {
+ name: "liblayers_proto",
+ defaults: [
+ "liblayers_proto_defaults",
+ ],
+}
+
+cc_library_static {
+ name: "liblayers_proto_static",
+ defaults: [
+ "liblayers_proto_defaults",
+ ],
}
java_library_static {