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}
|
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
|
package cc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"android/soong/aconfig"
|
|
||||||
|
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -127,7 +125,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
entries.SetString("SOONG_SDK_VARIANT_MODULES",
|
entries.SetString("SOONG_SDK_VARIANT_MODULES",
|
||||||
"$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))")
|
"$(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{
|
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||||
|
@@ -19,7 +19,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"android/soong/aconfig"
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
@@ -129,7 +128,7 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
if library.dexpreopter.configPath != nil {
|
if library.dexpreopter.configPath != nil {
|
||||||
entries.SetPath("LOCAL_SOONG_DEXPREOPT_CONFIG", library.dexpreopter.configPath)
|
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 {
|
if len(binary.dexpreopter.builtInstalled) > 0 {
|
||||||
entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled)
|
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{
|
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||||
@@ -455,7 +454,7 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
entries.SetOptionalPaths("LOCAL_SOONG_LINT_REPORTS", app.linter.reports)
|
entries.SetOptionalPaths("LOCAL_SOONG_LINT_REPORTS", app.linter.reports)
|
||||||
|
|
||||||
if app.Name() != "framework-res" {
|
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_FULL_MANIFEST_FILE", a.mergedManifestFile)
|
||||||
entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile)
|
entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile)
|
||||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
|
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
|
||||||
aconfig.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
||||||
})
|
})
|
||||||
|
|
||||||
return entriesList
|
return entriesList
|
||||||
|
@@ -17,7 +17,6 @@ package rust
|
|||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"android/soong/aconfig"
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ func (mod *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
if mod.UseVndk() {
|
if mod.UseVndk() {
|
||||||
entries.SetBool("LOCAL_USE_VNDK", true)
|
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