diff options
author | Matthew Maurer <mmaurer@google.com> | 2020-06-29 14:34:06 -0700 |
---|---|---|
committer | Matthew Maurer <mmaurer@google.com> | 2020-07-01 11:27:12 -0700 |
commit | 0f003b18516df3df3fa631ca6d1e21322d0947cf (patch) | |
tree | e27bef149ff927ca9364aef6722263259e1e6ce3 /rust/compiler.go | |
parent | 2ae0513a8e4f226c2161fb89e85ef997b0881278 (diff) |
rust: Add rustlibs auto dependency selection
Adds the rustlibs dependency type which will automatically select
between rlib and dylib based on the type of the library.
Bug: 143217452
Test: cd external/rust; mma
Change-Id: I97faadae98bf957090a32939cfb2d3a10f74a057
Diffstat (limited to 'rust/compiler.go')
-rw-r--r-- | rust/compiler.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index 51d7180ca..2aee17b18 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -67,6 +67,9 @@ type BaseCompilerProperties struct { // list of rust dylib crate dependencies Dylibs []string `android:"arch_variant"` + // list of rust automatic crate dependencies + Rustlibs []string `android:"arch_variant"` + // list of rust proc_macro crate dependencies Proc_macros []string `android:"arch_variant"` @@ -178,6 +181,7 @@ func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathD func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps { deps.Rlibs = append(deps.Rlibs, compiler.Properties.Rlibs...) deps.Dylibs = append(deps.Dylibs, compiler.Properties.Dylibs...) + deps.Rustlibs = append(deps.Rustlibs, compiler.Properties.Rustlibs...) deps.ProcMacros = append(deps.ProcMacros, compiler.Properties.Proc_macros...) deps.StaticLibs = append(deps.StaticLibs, compiler.Properties.Static_libs...) deps.SharedLibs = append(deps.SharedLibs, compiler.Properties.Shared_libs...) |