Loading android/config.go +5 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ const productVariablesFileName = "soong.variables" // 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"` } Loading Loading @@ -299,7 +298,7 @@ func NewConfig(srcDir, buildDir string) (Config, error) { var archConfig []archConfig if Bool(config.Mega_device) { archConfig = getMegaDeviceConfig() } else if Bool(config.Ndk_abis) { } else if config.NdkAbis() { archConfig = getNdkAbisConfig() } Loading Loading @@ -862,6 +861,10 @@ func (c vendorConfig) IsSet(name string) bool { return ok } func (c *config) NdkAbis() bool { return Bool(c.productVariables.Ndk_abis) } func stringSlice(s *[]string) []string { if s != nil { return *s Loading android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,8 @@ type productVariables struct { BoardPlatPrivateSepolicyDirs []string `json:",omitempty"` VendorVars map[string]map[string]string `json:",omitempty"` Ndk_abis *bool `json:",omitempty"` } func boolPtr(v bool) *bool { Loading cc/ndk_headers.go +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { // but keep them when doing regular platform build. // Ndk_abis property is only set to true with build/soong/scripts/build-ndk-prebuilts.sh // TODO: Revert this once MIPS is supported in NDK again. if Bool(ctx.AConfig().Ndk_abis) && strings.Contains(ctx.ModuleName(), "mips") { if ctx.Config().NdkAbis() && strings.Contains(ctx.ModuleName(), "mips") { return } Loading scripts/build-ndk-prebuilts.sh +3 −6 Original line number Diff line number Diff line Loading @@ -34,11 +34,6 @@ SOONG_OUT=${OUT_DIR}/soong SOONG_NDK_OUT=${OUT_DIR}/soong/ndk rm -rf ${SOONG_OUT} mkdir -p ${SOONG_OUT} cat > ${SOONG_OUT}/soong.config << EOF { "Ndk_abis": true } EOF # We only really need to set some of these variables, but soong won't merge this # with the defaults, so we need to write out all the defaults with our values Loading @@ -63,7 +58,9 @@ cat > ${SOONG_OUT}/soong.variables << EOF ], "HostArch": "x86_64", "Malloc_not_svelte": false, "Safestack": false "Safestack": false, "Ndk_abis": true } EOF m --skip-make ${SOONG_OUT}/ndk.timestamp Loading Loading
android/config.go +5 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ const productVariablesFileName = "soong.variables" // 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"` } Loading Loading @@ -299,7 +298,7 @@ func NewConfig(srcDir, buildDir string) (Config, error) { var archConfig []archConfig if Bool(config.Mega_device) { archConfig = getMegaDeviceConfig() } else if Bool(config.Ndk_abis) { } else if config.NdkAbis() { archConfig = getNdkAbisConfig() } Loading Loading @@ -862,6 +861,10 @@ func (c vendorConfig) IsSet(name string) bool { return ok } func (c *config) NdkAbis() bool { return Bool(c.productVariables.Ndk_abis) } func stringSlice(s *[]string) []string { if s != nil { return *s Loading
android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,8 @@ type productVariables struct { BoardPlatPrivateSepolicyDirs []string `json:",omitempty"` VendorVars map[string]map[string]string `json:",omitempty"` Ndk_abis *bool `json:",omitempty"` } func boolPtr(v bool) *bool { Loading
cc/ndk_headers.go +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { // but keep them when doing regular platform build. // Ndk_abis property is only set to true with build/soong/scripts/build-ndk-prebuilts.sh // TODO: Revert this once MIPS is supported in NDK again. if Bool(ctx.AConfig().Ndk_abis) && strings.Contains(ctx.ModuleName(), "mips") { if ctx.Config().NdkAbis() && strings.Contains(ctx.ModuleName(), "mips") { return } Loading
scripts/build-ndk-prebuilts.sh +3 −6 Original line number Diff line number Diff line Loading @@ -34,11 +34,6 @@ SOONG_OUT=${OUT_DIR}/soong SOONG_NDK_OUT=${OUT_DIR}/soong/ndk rm -rf ${SOONG_OUT} mkdir -p ${SOONG_OUT} cat > ${SOONG_OUT}/soong.config << EOF { "Ndk_abis": true } EOF # We only really need to set some of these variables, but soong won't merge this # with the defaults, so we need to write out all the defaults with our values Loading @@ -63,7 +58,9 @@ cat > ${SOONG_OUT}/soong.variables << EOF ], "HostArch": "x86_64", "Malloc_not_svelte": false, "Safestack": false "Safestack": false, "Ndk_abis": true } EOF m --skip-make ${SOONG_OUT}/ndk.timestamp Loading