Use OutputFilesProvider on bpf
This changes makes bpf module type uses OutputFilesProvider,
instead of current OutputFileProducer for inter-module-
communication.
Test: CI
Bug: 339477385
Bug: 342406930
Change-Id: I85d1141e9f6583cc5427756107da99f56b0c7ea1
diff --git a/bpf/bpf.go b/bpf/bpf.go
index 38fbd88..2eb869e 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -65,8 +65,6 @@
type BpfModule interface {
android.Module
- OutputFiles(tag string) (android.Paths, error)
-
// Returns the sub install directory if the bpf module is included by apex.
SubDir() string
}
@@ -213,6 +211,8 @@
}
android.SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs.Strings()})
+
+ ctx.SetOutputFiles(bpf.objs, "")
}
func (bpf *bpf) AndroidMk() android.AndroidMkData {
@@ -255,23 +255,10 @@
}
}
-// Implements OutputFileFileProducer interface so that the obj output can be used in the data property
-// of other modules.
-func (bpf *bpf) OutputFiles(tag string) (android.Paths, error) {
- switch tag {
- case "":
- return bpf.objs, nil
- default:
- return nil, fmt.Errorf("unsupported module reference tag %q", tag)
- }
-}
-
func (bpf *bpf) SubDir() string {
return bpf.properties.Sub_dir
}
-var _ android.OutputFileProducer = (*bpf)(nil)
-
func BpfFactory() android.Module {
module := &bpf{}