summaryrefslogtreecommitdiff
path: root/golang/golang.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-02-04 14:42:29 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-04 14:42:29 -0800
commit14ef63cf470af3b88f84b2a00f1d28faf27a1dd8 (patch)
treeef57dd464a687b82a65db80f6158b664c60eeb1f /golang/golang.go
parent07699dcf3990b3b5dc05a0c9e2cb195173f09887 (diff)
parent7613bd1929057a0da89f4c85ca6506ea98869286 (diff)
Merge "Create install rule for loadplugins without adding to blueprint_tools" into main
Diffstat (limited to 'golang/golang.go')
-rw-r--r--golang/golang.go21
1 files changed, 10 insertions, 11 deletions
diff --git a/golang/golang.go b/golang/golang.go
index d33f5e050..3422f8bdf 100644
--- a/golang/golang.go
+++ b/golang/golang.go
@@ -97,17 +97,16 @@ func (g *GoBinary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
outputFile := android.PathForArbitraryOutput(ctx, android.Rel(ctx, ctx.Config().OutDir(), g.IntermediateFile())).WithoutRel()
g.outputFile = outputFile
- // Don't create install rules for modules used by bootstrap, the install command line will differ from
- // what was used during bootstrap, which will cause ninja to rebuild the module on the next run,
- // triggering reanalysis.
- if !usedByBootstrap(ctx.ModuleName()) {
- installPath := ctx.InstallFile(android.PathForModuleInstall(ctx, "bin"), ctx.ModuleName(), outputFile)
-
- // Modules in an unexported namespace have no install rule, only add modules in the exported namespaces
- // to the blueprint_tools phony rules.
- if !ctx.Config().KatiEnabled() || g.ExportedToMake() {
- ctx.Phony("blueprint_tools", installPath)
- }
+ installPath := ctx.InstallFile(android.PathForModuleInstall(ctx, "bin"), ctx.ModuleName(), outputFile)
+
+ // Modules in an unexported namespace have no install rule, only add modules in the exported namespaces
+ // to the blueprint_tools phony rules.
+ if (!ctx.Config().KatiEnabled() || g.ExportedToMake()) && !usedByBootstrap(ctx.ModuleName()) {
+ // Don't add the installed file of bootstrap tools to the deps of `blueprint_tools`.
+ // The install command line will differ from what was used during bootstrap,
+ // which will cause ninja to rebuild the module on the next run,
+ // triggering reanalysis.
+ ctx.Phony("blueprint_tools", installPath)
}
ctx.SetOutputFiles(android.Paths{outputFile}, "")