diff options
author | Inseob Kim | 2019-05-08 23:29:15 -0500 |
---|---|---|
committer | Inseob Kim | 2019-05-14 20:26:54 -0500 |
commit | 1f086e2f0d36dfa17d75fca37060d46e95ef193b (patch) | |
tree | 6f4c60a034df1934ac2121463da0f84490e79c14 /android | |
parent | 0967b34dd95018719bc5bc2876f68a4921d81368 (diff) | |
download | platform-build-soong-1f086e2f0d36dfa17d75fca37060d46e95ef193b.tar.gz platform-build-soong-1f086e2f0d36dfa17d75fca37060d46e95ef193b.tar.xz platform-build-soong-1f086e2f0d36dfa17d75fca37060d46e95ef193b.zip |
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
Diffstat (limited to 'android')
-rw-r--r-- | android/config.go | 24 | ||||
-rw-r--r-- | android/util.go | 25 | ||||
-rw-r--r-- | android/variable.go | 2 |
3 files changed, 51 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go index 15e2ad4c..a18feb6d 100644 --- a/android/config.go +++ b/android/config.go | |||
@@ -288,6 +288,10 @@ func TestArchConfig(buildDir string, env map[string]string) Config { | |||
288 | 288 | ||
289 | config.BuildOsVariant = config.Targets[BuildOs][0].String() | 289 | config.BuildOsVariant = config.Targets[BuildOs][0].String() |
290 | config.BuildOsCommonVariant = getCommonTargets(config.Targets[BuildOs])[0].String() | 290 | config.BuildOsCommonVariant = getCommonTargets(config.Targets[BuildOs])[0].String() |
291 | config.TestProductVariables.DeviceArch = proptools.StringPtr("arm64") | ||
292 | config.TestProductVariables.DeviceArchVariant = proptools.StringPtr("armv8-a") | ||
293 | config.TestProductVariables.DeviceSecondaryArch = proptools.StringPtr("arm") | ||
294 | config.TestProductVariables.DeviceSecondaryArchVariant = proptools.StringPtr("armv7-a-neon") | ||
291 | 295 | ||
292 | return testConfig | 296 | return testConfig |
293 | } | 297 | } |
@@ -1100,3 +1104,23 @@ func (c *config) ProductPrivateSepolicyDirs() []string { | |||
1100 | func (c *config) ProductCompatibleProperty() bool { | 1104 | func (c *config) ProductCompatibleProperty() bool { |
1101 | return Bool(c.productVariables.ProductCompatibleProperty) | 1105 | return Bool(c.productVariables.ProductCompatibleProperty) |
1102 | } | 1106 | } |
1107 | |||
1108 | func (c *deviceConfig) BoardVndkRuntimeDisable() bool { | ||
1109 | return Bool(c.config.productVariables.BoardVndkRuntimeDisable) | ||
1110 | } | ||
1111 | |||
1112 | func (c *deviceConfig) DeviceArch() string { | ||
1113 | return String(c.config.productVariables.DeviceArch) | ||
1114 | } | ||
1115 | |||
1116 | func (c *deviceConfig) DeviceArchVariant() string { | ||
1117 | return String(c.config.productVariables.DeviceArchVariant) | ||
1118 | } | ||
1119 | |||
1120 | func (c *deviceConfig) DeviceSecondaryArch() string { | ||
1121 | return String(c.config.productVariables.DeviceSecondaryArch) | ||
1122 | } | ||
1123 | |||
1124 | func (c *deviceConfig) DeviceSecondaryArchVariant() string { | ||
1125 | return String(c.config.productVariables.DeviceSecondaryArchVariant) | ||
1126 | } | ||
diff --git a/android/util.go b/android/util.go index f9dce6fe..f7a3437c 100644 --- a/android/util.go +++ b/android/util.go | |||
@@ -52,6 +52,31 @@ func JoinWithPrefix(strs []string, prefix string) string { | |||
52 | return string(ret) | 52 | return string(ret) |
53 | } | 53 | } |
54 | 54 | ||
55 | func JoinWithSuffix(strs []string, suffix string, separator string) string { | ||
56 | if len(strs) == 0 { | ||
57 | return "" | ||
58 | } | ||
59 | |||
60 | if len(strs) == 1 { | ||
61 | return strs[0] + suffix | ||
62 | } | ||
63 | |||
64 | n := len(" ") * (len(strs) - 1) | ||
65 | for _, s := range strs { | ||
66 | n += len(suffix) + len(s) | ||
67 | } | ||
68 | |||
69 | ret := make([]byte, 0, n) | ||
70 | for i, s := range strs { | ||
71 | if i != 0 { | ||
72 | ret = append(ret, separator...) | ||
73 | } | ||
74 | ret = append(ret, s...) | ||
75 | ret = append(ret, suffix...) | ||
76 | } | ||
77 | return string(ret) | ||
78 | } | ||
79 | |||
55 | func sortedKeys(m map[string][]string) []string { | 80 | func sortedKeys(m map[string][]string) []string { |
56 | s := make([]string, 0, len(m)) | 81 | s := make([]string, 0, len(m)) |
57 | for k := range m { | 82 | for k := range m { |
diff --git a/android/variable.go b/android/variable.go index c5006716..ff3ebaf0 100644 --- a/android/variable.go +++ b/android/variable.go | |||
@@ -279,6 +279,8 @@ type productVariables struct { | |||
279 | BoardPlatPrivateSepolicyDirs []string `json:",omitempty"` | 279 | BoardPlatPrivateSepolicyDirs []string `json:",omitempty"` |
280 | BoardSepolicyM4Defs []string `json:",omitempty"` | 280 | BoardSepolicyM4Defs []string `json:",omitempty"` |
281 | 281 | ||
282 | BoardVndkRuntimeDisable *bool `json:",omitempty"` | ||
283 | |||
282 | VendorVars map[string]map[string]string `json:",omitempty"` | 284 | VendorVars map[string]map[string]string `json:",omitempty"` |
283 | 285 | ||
284 | Ndk_abis *bool `json:",omitempty"` | 286 | Ndk_abis *bool `json:",omitempty"` |