Make bpf implement SourceFileProducer.
This allows other modules depend on bpf object outputs via the data
property.
Bug: 120246361
Test: bpf_test.go
Change-Id: I2ba9b9fea4d60f896d16f34053eb04513eae30ea
diff --git a/bpf/bpf.go b/bpf/bpf.go
index fa1f3ff..3ef35b7 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -125,6 +125,14 @@
}
}
+// Implements SourceFileProducer interface so that the obj output can be used in the data property
+// of other modules.
+func (bpf *bpf) Srcs() android.Paths {
+ return bpf.objs
+}
+
+var _ android.SourceFileProducer = (*bpf)(nil)
+
func bpfFactory() android.Module {
module := &bpf{}