move SetAconfigFileMkEntries to android
This will need to be called by some modules handled in android. Bug: 308625757 Test: manual Change-Id: Ic56e8ef3a453c59866aab6d39a21108cf8536b56
This commit is contained in:
@@ -164,18 +164,3 @@ func (module *DeclarationsModule) GenerateAndroidBuildActions(ctx android.Module
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func SetAconfigFileMkEntries(m *android.ModuleBase, entries *android.AndroidMkEntries, aconfigFiles map[string]android.Paths) {
|
||||
// TODO(b/311155208): The default container here should be system.
|
||||
container := ""
|
||||
|
||||
if m.SocSpecific() {
|
||||
container = "vendor"
|
||||
} else if m.ProductSpecific() {
|
||||
container = "product"
|
||||
} else if m.SystemExtSpecific() {
|
||||
container = "system_ext"
|
||||
}
|
||||
|
||||
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles[container])
|
||||
}
|
||||
|
@@ -96,3 +96,18 @@ func mergeAconfigFiles(ctx ModuleContext, inputs Paths) Paths {
|
||||
|
||||
return Paths{output}
|
||||
}
|
||||
|
||||
func SetAconfigFileMkEntries(m *ModuleBase, entries *AndroidMkEntries, aconfigFiles map[string]Paths) {
|
||||
// TODO(b/311155208): The default container here should be system.
|
||||
container := ""
|
||||
|
||||
if m.SocSpecific() {
|
||||
container = "vendor"
|
||||
} else if m.ProductSpecific() {
|
||||
container = "product"
|
||||
} else if m.SystemExtSpecific() {
|
||||
container = "system_ext"
|
||||
}
|
||||
|
||||
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles[container])
|
||||
}
|
||||
|
@@ -15,8 +15,6 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"android/soong/aconfig"
|
||||
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
||||
"fmt"
|
||||
@@ -127,7 +125,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entries.SetString("SOONG_SDK_VARIANT_MODULES",
|
||||
"$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))")
|
||||
}
|
||||
aconfig.SetAconfigFileMkEntries(c.AndroidModuleBase(), entries, c.mergedAconfigFiles)
|
||||
android.SetAconfigFileMkEntries(c.AndroidModuleBase(), entries, c.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
|
@@ -19,7 +19,6 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"android/soong/aconfig"
|
||||
"android/soong/android"
|
||||
|
||||
"github.com/google/blueprint/proptools"
|
||||
@@ -129,7 +128,7 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if library.dexpreopter.configPath != nil {
|
||||
entries.SetPath("LOCAL_SOONG_DEXPREOPT_CONFIG", library.dexpreopter.configPath)
|
||||
}
|
||||
aconfig.SetAconfigFileMkEntries(&library.ModuleBase, entries, library.mergedAconfigFiles)
|
||||
android.SetAconfigFileMkEntries(&library.ModuleBase, entries, library.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -302,7 +301,7 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if len(binary.dexpreopter.builtInstalled) > 0 {
|
||||
entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled)
|
||||
}
|
||||
aconfig.SetAconfigFileMkEntries(&binary.ModuleBase, entries, binary.mergedAconfigFiles)
|
||||
android.SetAconfigFileMkEntries(&binary.ModuleBase, entries, binary.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
@@ -455,7 +454,7 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entries.SetOptionalPaths("LOCAL_SOONG_LINT_REPORTS", app.linter.reports)
|
||||
|
||||
if app.Name() != "framework-res" {
|
||||
aconfig.SetAconfigFileMkEntries(&app.ModuleBase, entries, app.mergedAconfigFiles)
|
||||
android.SetAconfigFileMkEntries(&app.ModuleBase, entries, app.mergedAconfigFiles)
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -533,7 +532,7 @@ func (a *AndroidLibrary) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entries.SetPath("LOCAL_FULL_MANIFEST_FILE", a.mergedManifestFile)
|
||||
entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile)
|
||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
|
||||
aconfig.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
||||
android.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
||||
})
|
||||
|
||||
return entriesList
|
||||
|
@@ -17,7 +17,6 @@ package rust
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"android/soong/aconfig"
|
||||
"android/soong/android"
|
||||
)
|
||||
|
||||
@@ -67,7 +66,7 @@ func (mod *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if mod.UseVndk() {
|
||||
entries.SetBool("LOCAL_USE_VNDK", true)
|
||||
}
|
||||
aconfig.SetAconfigFileMkEntries(mod.AndroidModuleBase(), entries, mod.mergedAconfigFiles)
|
||||
android.SetAconfigFileMkEntries(mod.AndroidModuleBase(), entries, mod.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user