summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2023-06-09 14:06:44 -0400
committer Ivan Lozano <ivanlozano@google.com> 2023-06-09 14:17:49 -0400
commit61c02cc5371395fc919b49b14ce253a151f2fa93 (patch)
treeb5ebacbcc81db111ae87cdf17aac3e06c9d88394 /rust/rust.go
parentb2cd6f69632f9b21dda9b3b59a6ea081e57860fc (diff)
rust: Bundle Rust shared dependencies in fuzzers
Rust shared library dependencies are not always bundled in cc_fuzz or rust_fuzz modules, which can lead to difficult to debug runtime errors when running these fuzzers. It can also be hard to determine which dependencies need to be explicitly declared. This CL makes sure that we bundle the appropriate transitive dependencies for our fuzzers. Bug: 249551848 Test: Soong tests Test: m <fuzzer> # check data/fuzz/<arch>/lib dir contents Change-Id: I957ca8898079b61e2ff20d750f8c92bf61ac394f
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go
index 4324ecbb9..e524c9fb6 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -631,6 +631,15 @@ func (mod *Module) CcLibraryInterface() bool {
return false
}
+func (mod *Module) RustLibraryInterface() bool {
+ if mod.compiler != nil {
+ if _, ok := mod.compiler.(libraryInterface); ok {
+ return true
+ }
+ }
+ return false
+}
+
func (mod *Module) IsFuzzModule() bool {
if _, ok := mod.compiler.(*fuzzDecorator); ok {
return true