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/library.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rust/library.go') diff --git a/rust/library.go b/rust/library.go index 8b8e797a2..d718eb897 100644 --- a/rust/library.go +++ b/rust/library.go @@ -368,7 +368,8 @@ func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags) F func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Path { var outputFile android.WritablePath - srcPath := srcPathFromModuleSrcs(ctx, library.baseCompiler.Properties.Srcs) + srcPath, paths := srcPathFromModuleSrcs(ctx, library.baseCompiler.Properties.Srcs) + deps.SrcDeps = paths flags.RustFlags = append(flags.RustFlags, deps.depFlags...) -- cgit v1.2.3-59-g8ed1b