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/androidmk.go b/cc/androidmk.go
index 5e38973..f5e04bb 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -151,6 +151,7 @@
ret.Class = "HEADER_LIBRARIES"
}
+ ret.DistFile = library.distFile
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
library.androidMkWriteExportedFlags(w)
fmt.Fprintln(w, "LOCAL_ADDITIONAL_DEPENDENCIES := ")
@@ -194,6 +195,7 @@
ctx.subAndroidMk(ret, binary.baseInstaller)
ret.Class = "EXECUTABLES"
+ ret.DistFile = binary.distFile
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", binary.unstrippedOutputFile.String())
if len(binary.symlinks) > 0 {