summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joe Onorato <joeo@google.com> 2019-04-03 18:19:43 -0700
committer Joe Onorato <joeo@google.com> 2019-04-04 21:44:03 -0700
commit9bd5db7a68b7e91d97d3b7b0dfc70a1dd45f9abb (patch)
treeab331753f648a4de61ddbe8ed5a778792dcbf3d0
parent108413a9d61a983bd55fa6c5ae975ed00db75a29 (diff)
Make libplatformprotos-static, which is safe to use when you don't have shared libraries.
Bug: 123543706 Test: treehugger Change-Id: I9706478e99bee914b200a39f08274ecc2dc07951
-rw-r--r--Android.bp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 5b8e6e1b8d32..4e25717c59da 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1048,6 +1048,35 @@ cc_library {
},
}
+// This library is meant for vendor code that needs to output protobuf. It links
+// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
+// binary compatibility.
+cc_library {
+ name: "libplatformprotos-static",
+ defaults: ["libplatformprotos-defaults"],
+ host_supported: false,
+
+ // This is okay because this library is only built as a static library. The C++
+ // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
+ // but is not authorized to be used outside of debugging.
+ vendor_available: true,
+
+ target: {
+ android: {
+ proto: {
+ type: "lite",
+ },
+ static_libs: [
+ "libprotobuf-cpp-lite",
+ ],
+ shared: {
+ enabled: false,
+ },
+ },
+ },
+}
+
+
// This is the full proto version of libplatformprotos. It may only
// be used by test code that is not shipped on the device.
cc_library {