Output shared dependendencies of JNI libs for Java fuzzers

Test: m example_java_jni_fuzzer
Bug: 252846698
Change-Id: Ib583de335482350bfe293f9c3d021a595edd4f44
This commit is contained in:
Muhammad Haseeb Ahmad
2022-10-20 00:55:58 +00:00
parent 17b8795814
commit 431ddf9b76
3 changed files with 11 additions and 6 deletions

View File

@@ -104,7 +104,9 @@ func (j *JavaFuzzLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext)
j.fuzzPackagedModule.Config = configPath
}
ctx.VisitDirectDepsWithTag(cc.JniFuzzLibTag, func(dep android.Module) {
_, sharedDeps := cc.CollectAllSharedDependencies(ctx)
for _, dep := range sharedDeps {
sharedLibInfo := ctx.OtherModuleProvider(dep, cc.SharedLibraryInfoProvider).(cc.SharedLibraryInfo)
if sharedLibInfo.SharedLibrary != nil {
// The .class jars are output in slightly different locations
@@ -127,7 +129,7 @@ func (j *JavaFuzzLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext)
} else {
ctx.PropertyErrorf("jni_libs", "%q of type %q is not supported", dep.Name(), ctx.OtherModuleType(dep))
}
})
}
j.Library.GenerateAndroidBuildActions(ctx)
}