summaryrefslogtreecommitdiff
path: root/bpf/bpf.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-13 02:05:00 +0000
committer Yu Liu <yudiliu@google.com> 2025-02-19 00:18:39 +0000
commit0a37d429bcbfdf5110bbfcf14f43764dc01585a4 (patch)
treeacda2280ff7ee8cd210a9696b615297d64c4d5b4 /bpf/bpf.go
parent9354e34a7b2ba36b1e611dc0f062416649decbeb (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 'bpf/bpf.go')
-rw-r--r--bpf/bpf.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/bpf/bpf.go b/bpf/bpf.go
index 3f3438247..deb465dd6 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -60,6 +60,12 @@ func registerBpfBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("bpf", BpfFactory)
}
+type BpfInfo struct {
+ SubDir string
+}
+
+var BpfInfoProvider = blueprint.NewProvider[BpfInfo]()
+
var PrepareForTestWithBpf = android.FixtureRegisterWithContext(registerBpfBuildComponents)
// BpfModule interface is used by the apex package to gather information from a bpf module.
@@ -230,6 +236,10 @@ func (bpf *bpf) GenerateAndroidBuildActions(ctx android.ModuleContext) {
ctx.PackageFile(installDir, obj.Base(), obj)
}
+ android.SetProvider(ctx, BpfInfoProvider, BpfInfo{
+ SubDir: bpf.SubDir(),
+ })
+
ctx.SetOutputFiles(bpf.objs, "")
}