Add dist support to Soong
When dist'ing a library or binary that has use_version_lib set, always
distribute the stamped version, even for the device.
Test: m test_build_version_test dist
Change-Id: I2995ec516b1d182ce18f099aeaa4d186ffbcf01f
diff --git a/cc/libbuildversion/tests/Android.bp b/cc/libbuildversion/tests/Android.bp
index a18bc6c..b3b2061 100644
--- a/cc/libbuildversion/tests/Android.bp
+++ b/cc/libbuildversion/tests/Android.bp
@@ -2,10 +2,53 @@
name: "build_version_test_defaults",
use_version_lib: true,
host_supported: true,
+ dist: {
+ targets: ["test_build_version_test"],
+ },
target: {
+ android_arm: {
+ dist: {
+ dir: "android/arm",
+ },
+ },
+ android_arm64: {
+ dist: {
+ dir: "android/arm64",
+ },
+ },
+ android_x86: {
+ dist: {
+ dir: "android/x86",
+ },
+ },
+ android_x86_64: {
+ dist: {
+ dir: "android/x86_64",
+ },
+ },
+ darwin: {
+ dist: {
+ dir: "host/",
+ },
+ },
+ linux_glibc_x86: {
+ dist: {
+ dir: "host32/",
+ },
+ },
+ linux_glibc_x86_64: {
+ dist: {
+ dir: "host/",
+ },
+ },
windows: {
enabled: true,
},
+ windows_x86_64: {
+ dist: {
+ dest: "win64/build_ver_test.exe",
+ },
+ },
},
}
@@ -20,6 +63,11 @@
not_windows: {
shared_libs: ["libbuild_version_test"],
},
+ host: {
+ dist: {
+ suffix: "_host",
+ },
+ },
},
}