Move fuzzer's CollectAllSharedDependencies into GenerateAndroidBuildActions

Make rust and cc fuzzers collect their shared libraries once in
GenerateAndroidBuildActions and store it for later use by the
packaging singleton.  Also use android.OutputFileForModule to get
the paths.  Together this will fix fuzzers that depend on architecture
specific prebuilt shared libraries that are missing a prebuilt for an
architecture when building with AllowMissingDependencies.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I154a6f3a767c883e9fe7067003615db73ee78e2d
This commit is contained in:
Colin Cross
2022-10-04 16:35:39 -07:00
parent 553a31be9d
commit 31d89b4e0c
4 changed files with 64 additions and 70 deletions

View File

@@ -3330,6 +3330,11 @@ func (c *Module) OutputFiles(tag string) (android.Paths, error) {
return android.Paths{c.outputFile.Path()}, nil
}
return android.Paths{}, nil
case "unstripped":
if c.linker != nil {
return android.PathsIfNonNil(c.linker.unstrippedOutputFilePath()), nil
}
return nil, nil
default:
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
}