diff options
author | Chih-Hung Hsieh <chh@google.com> | 2020-05-15 17:36:30 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2020-07-08 23:50:00 -0700 |
commit | bbd25aeb428edaa7fb332cc0a6771aeede38e286 (patch) | |
tree | 315941dd2e085d7a332fbc0122b9673dab212653 /rust/proc_macro.go | |
parent | ecc495fd096871feff67f598fc768ba972a84dd9 (diff) |
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
Diffstat (limited to 'rust/proc_macro.go')
-rw-r--r-- | rust/proc_macro.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/proc_macro.go b/rust/proc_macro.go index 2719161e5..49dbd8dc2 100644 --- a/rust/proc_macro.go +++ b/rust/proc_macro.go @@ -65,7 +65,8 @@ func (procMacro *procMacroDecorator) compile(ctx ModuleContext, flags Flags, dep fileName := procMacro.getStem(ctx) + ctx.toolchain().ProcMacroSuffix() outputFile := android.PathForModuleOut(ctx, fileName) - srcPath := srcPathFromModuleSrcs(ctx, procMacro.baseCompiler.Properties.Srcs) + srcPath, paths := srcPathFromModuleSrcs(ctx, procMacro.baseCompiler.Properties.Srcs) + deps.SrcDeps = paths procMacro.unstrippedOutputFile = outputFile |