Support removing suffix for device specific prebuilt during build
Some device specific prebuilts have a suffix that varies depending on the lunch target. The resulting install dependency binary has the suffix. The fuzzer build expects the presubmit binary without the suffix. This change is to drop the suffix. Test: make haiku Change-Id: I8eadd84bf5797659b17bc428dca47b7c3f382aff
This commit is contained in:
10
rust/fuzz.go
10
rust/fuzz.go
@@ -31,7 +31,7 @@ type fuzzDecorator struct {
|
||||
*binaryDecorator
|
||||
|
||||
fuzzPackagedModule fuzz.FuzzPackagedModule
|
||||
sharedLibraries android.Paths
|
||||
sharedLibraries android.RuleBuilderInstalls
|
||||
installedSharedDeps []string
|
||||
}
|
||||
|
||||
@@ -119,15 +119,17 @@ func (fuzz *fuzzDecorator) install(ctx ModuleContext) {
|
||||
// Grab the list of required shared libraries.
|
||||
fuzz.sharedLibraries, _ = cc.CollectAllSharedDependencies(ctx)
|
||||
|
||||
for _, lib := range fuzz.sharedLibraries {
|
||||
for _, ruleBuilderInstall := range fuzz.sharedLibraries {
|
||||
install := ruleBuilderInstall.To
|
||||
|
||||
fuzz.installedSharedDeps = append(fuzz.installedSharedDeps,
|
||||
cc.SharedLibraryInstallLocation(
|
||||
lib, ctx.Host(), installBase, ctx.Arch().ArchType.String()))
|
||||
install, ctx.Host(), installBase, ctx.Arch().ArchType.String()))
|
||||
|
||||
// Also add the dependency on the shared library symbols dir.
|
||||
if !ctx.Host() {
|
||||
fuzz.installedSharedDeps = append(fuzz.installedSharedDeps,
|
||||
cc.SharedLibrarySymbolsInstallLocation(lib, installBase, ctx.Arch().ArchType.String()))
|
||||
cc.SharedLibrarySymbolsInstallLocation(install, installBase, ctx.Arch().ArchType.String()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -649,7 +649,7 @@ func (mod *Module) FuzzPackagedModule() fuzz.FuzzPackagedModule {
|
||||
panic(fmt.Errorf("FuzzPackagedModule called on non-fuzz module: %q", mod.BaseModuleName()))
|
||||
}
|
||||
|
||||
func (mod *Module) FuzzSharedLibraries() android.Paths {
|
||||
func (mod *Module) FuzzSharedLibraries() android.RuleBuilderInstalls {
|
||||
if fuzzer, ok := mod.compiler.(*fuzzDecorator); ok {
|
||||
return fuzzer.sharedLibraries
|
||||
}
|
||||
|
Reference in New Issue
Block a user