summaryrefslogtreecommitdiff
path: root/rust/fuzz.go
diff options
context:
space:
mode:
author Hamzeh Zawawy <hamzeh@google.com> 2023-04-05 22:08:46 +0000
committer Hamzeh Zawawy <hamzeh@google.com> 2023-05-09 23:11:42 +0000
commit38917496e5e87fd638dc2a5a8dff937bb436480c (patch)
tree1aba0e52b760ef1dac560144f86ab1cdceb3def3 /rust/fuzz.go
parentdd69e0f225975f548fea36faaf394dcfe37ba32b (diff)
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
Diffstat (limited to 'rust/fuzz.go')
-rw-r--r--rust/fuzz.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/rust/fuzz.go b/rust/fuzz.go
index d7e7ddfff..c2b940525 100644
--- a/rust/fuzz.go
+++ b/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()))
}
}
}