summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-19 10:05:47 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-19 10:05:47 -0800
commit3c551be748d53083d57e6f50c16fe9ba3546ed14 (patch)
treeb28adfc4473dc0cf022fe169ab29ecf02df223e0 /sh
parentdaeb7c813ce0a6150d76c4f67c1c43d1ecde052f (diff)
parent0a37d429bcbfdf5110bbfcf14f43764dc01585a4 (diff)
Merge "Change depVisitor to use providers instead of type-asserting to interfaces directly, the next step is to change it to use ModuleProxy once IsDepInSameApex is ready." into main
Diffstat (limited to 'sh')
-rw-r--r--sh/sh_binary.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index 77066f149..c0c6ff2ae 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -41,6 +41,14 @@ func init() {
registerShBuildComponents(android.InitRegistrationContext)
}
+type ShBinaryInfo struct {
+ SubDir string
+ OutputFile android.Path
+ Symlinks []string
+}
+
+var ShBinaryInfoProvider = blueprint.NewProvider[ShBinaryInfo]()
+
func registerShBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("sh_binary", ShBinaryFactory)
ctx.RegisterModuleType("sh_binary_host", ShBinaryHostFactory)
@@ -314,6 +322,12 @@ func (s *ShBinary) generateAndroidBuildActions(ctx android.ModuleContext) {
s.properties.SubName = s.GetSubname(ctx)
+ android.SetProvider(ctx, ShBinaryInfoProvider, ShBinaryInfo{
+ SubDir: s.SubDir(),
+ OutputFile: s.OutputFile(),
+ Symlinks: s.Symlinks(),
+ })
+
ctx.SetOutputFiles(android.Paths{s.outputFilePath}, "")
}