diff options
author | 2024-05-22 14:36:09 -0700 | |
---|---|---|
committer | 2024-06-04 22:09:13 -0700 | |
commit | e6c8581fbef9ee7d9cd859b61ba07564ea1299c2 (patch) | |
tree | 9b286cf3f03bcc12c49f68e324ac338976b8342c /bpf/bpf.go | |
parent | 5f2be11396ae371f6b7e2a5700ec9c2b41dc0826 (diff) |
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
Diffstat (limited to 'bpf/bpf.go')
-rw-r--r-- | bpf/bpf.go | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/bpf/bpf.go b/bpf/bpf.go index 38fbd8804..2eb869ebe 100644 --- a/bpf/bpf.go +++ b/bpf/bpf.go @@ -65,8 +65,6 @@ var PrepareForTestWithBpf = android.FixtureRegisterWithContext(registerBpfBuildC 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 @@ func (bpf *bpf) GenerateAndroidBuildActions(ctx android.ModuleContext) { } android.SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs.Strings()}) + + ctx.SetOutputFiles(bpf.objs, "") } func (bpf *bpf) AndroidMk() android.AndroidMkData { @@ -255,23 +255,10 @@ func (bpf *bpf) AndroidMk() android.AndroidMkData { } } -// 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{} |