aboutsummaryrefslogtreecommitdiffstats
path: root/Android.bp
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-08-16 14:22:26 -0700
committerColin Cross <ccross@android.com>2019-09-06 13:59:47 -0700
commitf609a27b2eb42f1dde7c26dce95174f9ef95a498 (patch)
treea41056379107d3928a1ca0df4fe35611d64b244a /Android.bp
parentff3160af28d6e71826d986c3f7b12aed8f95eda7 (diff)
downloadplatform_external_protobuf-f609a27b2eb42f1dde7c26dce95174f9ef95a498.tar.gz
platform_external_protobuf-f609a27b2eb42f1dde7c26dce95174f9ef95a498.tar.bz2
platform_external_protobuf-f609a27b2eb42f1dde7c26dce95174f9ef95a498.zip
Version vendor libprotobuf-cpp-* libraries
Vendor prebuilts reference the protobuf runtime libraries, but the runtime libraries do not have a stable ABI. Add a version suffix to the names of the libraries when used by vendor modules so that old versions can be left in place when the protobuf version is updated. Also adds a test that verifies that the library names match the version number to ensure the version number gets updated when protobuf is updated. Bug: 117607748 Test: libprotobuf_vendor_suffix_test Change-Id: Iee5bbe95cb898f8ab552028f32e4b40d67f54f23 Merged-In: Iee5bbe95cb898f8ab552028f32e4b40d67f54f23
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index f0f13879e..e767f01dd 100644
--- a/Android.bp
+++ b/Android.bp
@@ -79,6 +79,10 @@ cc_defaults {
android: {
shared_libs: ["liblog"],
},
+ vendor: {
+ // This suffix must be updated when a new version is imported.
+ suffix: "-3.9.1",
+ },
},
}
@@ -375,6 +379,20 @@ cc_binary_host {
rtti: true,
}
+cc_test {
+ name: "libprotobuf_vendor_suffix_test",
+ vendor: true,
+ srcs: ["vendor_suffix_test.cpp"],
+ shared_libs: [
+ "libprotobuf-cpp-lite",
+ "libprotobuf-cpp-full",
+ ],
+ static_libs: ["libbase"],
+ stl: "libc++",
+ test_suites: ["general-tests"],
+ test_config: "vendor_suffix_test.config",
+}
+
java_defaults {
name: "libprotobuf_errorprone_defaults",
errorprone: {