Generate VNDK snapshot with Soong except configs

This is the first commit to generate VNDK snapshot with Soong: .so
files, some txt files, and notice files are captured with Soong. As
ld.config.txt is currently in Android.mk and will be deprecated soon,
configs files (and zipping all of artifacts) are still handled with
Makefile.

Bug: 131564934
Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh
Test: 2) try installing vndk snapshot with:
     development/vndk/snapshot/update.py

Change-Id: I8629e1e25bfc461fd495565bb4872c9af176cf92
This commit is contained in:
Inseob Kim
2019-05-09 13:29:15 +09:00
parent 0967b34dd9
commit 1f086e2f0d
6 changed files with 402 additions and 59 deletions

View File

@@ -52,6 +52,31 @@ func JoinWithPrefix(strs []string, prefix string) string {
return string(ret)
}
func JoinWithSuffix(strs []string, suffix string, separator string) string {
if len(strs) == 0 {
return ""
}
if len(strs) == 1 {
return strs[0] + suffix
}
n := len(" ") * (len(strs) - 1)
for _, s := range strs {
n += len(suffix) + len(s)
}
ret := make([]byte, 0, n)
for i, s := range strs {
if i != 0 {
ret = append(ret, separator...)
}
ret = append(ret, s...)
ret = append(ret, suffix...)
}
return string(ret)
}
func sortedKeys(m map[string][]string) []string {
s := make([]string, 0, len(m))
for k := range m {