diff options
author | 2024-09-12 14:35:29 -0700 | |
---|---|---|
committer | 2024-09-27 10:32:24 -0700 | |
commit | 648daea67d55b7e0996923880f45b4923289a26e (patch) | |
tree | 2ede92d82d3871fa8cace8110154ed10c7d35472 /apex/apex.go | |
parent | 874273545b58747a617cf418dd93cb1902d7de89 (diff) |
Remove blueprint.Module helper functions
Now that blueprint_go_binary modules are wrapped in a module type
that implements android.Module Soong should never see a blueprint.Module.
Remove the versions of the context methods that allow working with
blueprint.Modules.
Genrules still need VisitDirectDepsAllowDisabled, as they use a hack
that adds dependencies on host tools after the prebuilts mutators have
run, which means they may have a dependency on a disabled prebuilt
and need to manually forward it to the corresponding source module.
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: I9147b450269749326e8fe75c5af310bd2d898d8c
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apex/apex.go b/apex/apex.go index 79f1ad610..5f4d823ff 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1935,12 +1935,12 @@ func (vctx *visitorContext) normalizeFileInfo(mctx android.ModuleContext) { }) } -func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext, child, parent blueprint.Module) bool { +func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext, child, parent android.Module) bool { depTag := ctx.OtherModuleDependencyTag(child) if _, ok := depTag.(android.ExcludeFromApexContentsTag); ok { return false } - if mod, ok := child.(android.Module); ok && !mod.Enabled(ctx) { + if !child.Enabled(ctx) { return false } depName := ctx.OtherModuleName(child) @@ -2284,7 +2284,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { checkDuplicate: a.shouldCheckDuplicate(ctx), unwantedTransitiveDeps: a.properties.Unwanted_transitive_deps, } - ctx.WalkDepsBlueprint(func(child, parent blueprint.Module) bool { return a.depVisitor(&vctx, ctx, child, parent) }) + ctx.WalkDeps(func(child, parent android.Module) bool { return a.depVisitor(&vctx, ctx, child, parent) }) vctx.normalizeFileInfo(ctx) if a.privateKeyFile == nil { if ctx.Config().AllowMissingDependencies() { @@ -2685,7 +2685,7 @@ func (a *apexBundle) checkClasspathFragments(ctx android.ModuleContext) { func (a *apexBundle) checkJavaStableSdkVersion(ctx android.ModuleContext) { // Visit direct deps only. As long as we guarantee top-level deps are using stable SDKs, // java's checkLinkType guarantees correct usage for transitive deps - ctx.VisitDirectDepsBlueprint(func(module blueprint.Module) { + ctx.VisitDirectDeps(func(module android.Module) { tag := ctx.OtherModuleDependencyTag(module) switch tag { case javaLibTag, androidAppTag: @@ -2778,7 +2778,7 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { // checkStaticExecutable ensures that executables in an APEX are not static. func (a *apexBundle) checkStaticExecutables(ctx android.ModuleContext) { - ctx.VisitDirectDepsBlueprint(func(module blueprint.Module) { + ctx.VisitDirectDeps(func(module android.Module) { if ctx.OtherModuleDependencyTag(module) != executableTag { return } |