summaryrefslogtreecommitdiff
path: root/bpf/bpf.go
diff options
context:
space:
mode:
Diffstat (limited to 'bpf/bpf.go')
-rw-r--r--bpf/bpf.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/bpf/bpf.go b/bpf/bpf.go
index 4cdfb315c..297e13a4f 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -26,7 +26,7 @@ import (
)
func init() {
- android.RegisterModuleType("bpf", bpfFactory)
+ android.RegisterModuleType("bpf", BpfFactory)
pctx.Import("android/soong/cc/config")
}
@@ -43,6 +43,13 @@ var (
"ccCmd", "cFlags")
)
+// BpfModule interface is used by the apex package to gather information from a bpf module.
+type BpfModule interface {
+ android.Module
+
+ OutputFiles(tag string) (android.Paths, error)
+}
+
type BpfProperties struct {
Srcs []string `android:"path"`
Cflags []string
@@ -141,7 +148,7 @@ func (bpf *bpf) OutputFiles(tag string) (android.Paths, error) {
var _ android.OutputFileProducer = (*bpf)(nil)
-func bpfFactory() android.Module {
+func BpfFactory() android.Module {
module := &bpf{}
module.AddProperties(&module.properties)