From bbd25aeb428edaa7fb332cc0a6771aeede38e286 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Fri, 15 May 2020 17:36:30 -0700 Subject: Specify module dependency in the srcs list * "srcs" list contains one main Rust source file, followed by optional dependent modules. * A dependent module included in the "srcs" list is the module name prefixed with ":". * Add a simple test. Bug: 160331255 Test: make and manual test build dependencies on genrule modules Change-Id: I4f079138c2599158810b6412fce81b612a3f64a4 --- rust/rust.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rust/rust.go') diff --git a/rust/rust.go b/rust/rust.go index 72301a718..7a98c6468 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -239,6 +239,9 @@ type PathDeps struct { CrtBegin android.OptionalPath CrtEnd android.OptionalPath + + // Paths to generated source files + SrcDeps android.Paths } type RustLibraries []RustLibrary @@ -843,6 +846,7 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { // Dedup exported flags from dependencies depPaths.linkDirs = android.FirstUniqueStrings(depPaths.linkDirs) depPaths.depFlags = android.FirstUniqueStrings(depPaths.depFlags) + depPaths.SrcDeps = android.FirstUniquePaths(depPaths.SrcDeps) return depPaths } -- cgit v1.2.3-59-g8ed1b