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
This commit is contained in:
committed by
Ivan Lozano
parent
682c9d7b25
commit
588aae727b
@@ -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) {
|
||||
|
Reference in New Issue
Block a user