aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/androidmk.go42
-rw-r--r--root.bp4
2 files changed, 5 insertions, 41 deletions
diff --git a/common/androidmk.go b/common/androidmk.go
index 9bd3a191..86efb042 100644
--- a/common/androidmk.go
+++ b/common/androidmk.go
@@ -51,53 +51,19 @@ func AndroidMkSingleton() blueprint.Singleton {
type androidMkSingleton struct{}
func (c *androidMkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
- dirModules := make(map[string][]blueprint.Module)
- hasBPDir := make(map[string]bool)
- bpDirs := []string{}
-
if !ctx.Config().(Config).EmbeddedInMake() {
return
}
ctx.SetNinjaBuildDir(pctx, filepath.Join(ctx.Config().(Config).buildDir, ".."))
- ctx.VisitAllModules(func(module blueprint.Module) {
- if _, ok := module.(AndroidModule); ok {
- bpDir := filepath.Dir(ctx.BlueprintFile(module))
-
- if !hasBPDir[bpDir] {
- hasBPDir[bpDir] = true
- bpDirs = append(bpDirs, bpDir)
- }
-
- dirModules[bpDir] = append(dirModules[bpDir], module)
- }
- })
+ var androidMkModulesList []AndroidModule
- // Gather list of eligible Android modules for translation
- androidMkModules := make(map[blueprint.Module]bool)
- sort.Strings(bpDirs)
- for _, bpDir := range bpDirs {
- mkFile := OptionalPathForSource(ctx, "androidmk", bpDir, "Android.mk")
- if !mkFile.Valid() {
- for _, mod := range dirModules[bpDir] {
- androidMkModules[mod] = true
- }
- }
- }
-
- // Validate that all modules have proper dependencies
- androidMkModulesList := make([]AndroidModule, 0, len(androidMkModules))
- for mod := range androidMkModules {
- ctx.VisitDepsDepthFirstIf(mod, isAndroidModule, func(module blueprint.Module) {
- if !androidMkModules[module] {
- ctx.Errorf("Module %q missing dependency for Android.mk: %q", ctx.ModuleName(mod), ctx.ModuleName(module))
- }
- })
- if amod, ok := mod.(AndroidModule); ok {
+ ctx.VisitAllModules(func(module blueprint.Module) {
+ if amod, ok := module.(AndroidModule); ok {
androidMkModulesList = append(androidMkModulesList, amod)
}
- }
+ })
sort.Sort(AndroidModulesByName{androidMkModulesList, ctx})
diff --git a/root.bp b/root.bp
index ea17db37..6f208323 100644
--- a/root.bp
+++ b/root.bp
@@ -1,17 +1,15 @@
subname = "Android.bp"
subdirs = [
- "art",
"build/blueprint",
"build/soong",
- "bionic",
+ "bionic/*",
"dalvik",
"external/*",
"frameworks/base",
"frameworks/native/libs/*",
"hardware/*",
"libcore",
- "libnativehelper",
"prebuilts/ndk",
"prebuilts/sdk",
"system/core/*",