summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2021-10-14 12:22:09 -0400
committer Ivan Lozano <ivanlozano@google.com> 2021-10-14 15:31:47 -0400
commit39b0bf03267fb8201c219b441436e08367c89e51 (patch)
tree713034782c5f3d7d4979144ab182905568558a95 /rust/rust.go
parentf7bc97ce7a9b5afd96efad424a87cc690f8568b0 (diff)
rust: Package shared libraries with fuzzer zips
Rust fuzzers were not packaging up their CC shared dependencies. This would lead to fuzzers using the shared libraries included on system, which may not be sanitized, leading to incorrect behavior. This refactors the relevant code from CC and calls it from the Rust build logic. Bug: 202282599 Test: output rust fuzzer zip file includes shared dependencies. Change-Id: I92196eb0141733797a67eae24f8e9aedea94c3bc
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go
index 93dbd0010..13169f17e 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -594,6 +594,13 @@ func (mod *Module) CcLibraryInterface() bool {
return false
}
+func (mod *Module) UnstrippedOutputFile() android.Path {
+ if mod.unstrippedOutputFile.Valid() {
+ return mod.unstrippedOutputFile.Path()
+ }
+ return nil
+}
+
func (mod *Module) IncludeDirs() android.Paths {
if mod.compiler != nil {
if library, ok := mod.compiler.(*libraryDecorator); ok {