diff options
author | 2020-08-21 10:01:58 +0000 | |
---|---|---|
committer | 2020-08-31 14:05:39 -0400 | |
commit | 588aae727bf352a1512a69c92e0af330977f01d3 (patch) | |
tree | 2265b96a7ecb1a59027b7dafe3809cc2097885b6 /rust/androidmk.go | |
parent | 682c9d7b2538f8f7f2185296b91abf04835912fc (diff) |
Add rust_protobuf module.
This adds a new SourceProvider module type to handle protobuf code
generation. See the new test for an example of how to call this.
Bug: 143953733
Test: New soong tests pass.
Test: Replacing genrules in crosvm with rust_protobuf modules.
Change-Id: Ie3117129cde37b8736bc18ee09bf5cde27c01c34
Diffstat (limited to 'rust/androidmk.go')
-rw-r--r-- | rust/androidmk.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rust/androidmk.go b/rust/androidmk.go index 10f10d86f..edae0e63d 100644 --- a/rust/androidmk.go +++ b/rust/androidmk.go @@ -165,14 +165,16 @@ func (sourceProvider *BaseSourceProvider) AndroidMk(ctx AndroidMkContext, ret *a stem, suffix, _ := android.SplitFileExt(file) fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+suffix) fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem) + fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true") }) } func (bindgen *bindgenDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) { ctx.SubAndroidMk(ret, bindgen.BaseSourceProvider) - ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) { - fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true") - }) +} + +func (proto *protobufDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) { + ctx.SubAndroidMk(ret, proto.BaseSourceProvider) } func (compiler *baseCompiler) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) { |