Move Ndk_abis from soong.config to soong.variables
soong.config is not cleared between builds, which can cause
problems when switching between an ndk build and a platform build.
Bug: 118398924
Test: OUT_DIR=out_ndk DIST_DIR=dist build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: Ifc03a0c25f46625375cdda5723e4a09d7d8050d5
diff --git a/android/config.go b/android/config.go
index 0aee0e3..3b7b477 100644
--- a/android/config.go
+++ b/android/config.go
@@ -41,7 +41,6 @@
// config file. These will be included in the config struct.
type FileConfigurableOptions struct {
Mega_device *bool `json:",omitempty"`
- Ndk_abis *bool `json:",omitempty"`
Host_bionic *bool `json:",omitempty"`
}
@@ -299,7 +298,7 @@
var archConfig []archConfig
if Bool(config.Mega_device) {
archConfig = getMegaDeviceConfig()
- } else if Bool(config.Ndk_abis) {
+ } else if config.NdkAbis() {
archConfig = getNdkAbisConfig()
}
@@ -862,6 +861,10 @@
return ok
}
+func (c *config) NdkAbis() bool {
+ return Bool(c.productVariables.Ndk_abis)
+}
+
func stringSlice(s *[]string) []string {
if s != nil {
return *s