diff options
author | 2025-02-13 02:05:00 +0000 | |
---|---|---|
committer | 2025-02-19 00:18:39 +0000 | |
commit | 0a37d429bcbfdf5110bbfcf14f43764dc01585a4 (patch) | |
tree | acda2280ff7ee8cd210a9696b615297d64c4d5b4 /sh/sh_binary.go | |
parent | 9354e34a7b2ba36b1e611dc0f062416649decbeb (diff) |
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.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I13a4e256a26dbf7f9b3b746d628ac8f68b4e598e
Diffstat (limited to 'sh/sh_binary.go')
-rw-r--r-- | sh/sh_binary.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go index d753d246a..2da73281d 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}, "") } |