From c49649c059ffa80433f7789250363728ce1f1608 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 1 Oct 2020 21:25:05 -0700 Subject: Use protobuf-codegen default and add mod_stem.rs * Upgrade to new protobuf-codegen; use its standard default output without local change. * Allow a sourceProvider to have multiple output files. For a stem.proto file, output stem.rs and mod_stem.rs. * New protobuf-codegen option gen_mod_rs always generates output file named "mod.rs". To generate multiple .proto files into the same output directory, we need to rename mod.rs to mod_.rs. * Instead of using the gen_mod_rs option and renaming mod.rs to mod_.rs, we generate the same mod_.rs directly with a simple printf command. Bug: 170256643 Test: atest -c --host --include-subdirs external/crosvm Change-Id: Ia09e41029099a6de4d35c96dbabd9ba5514c9019 --- rust/androidmk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/androidmk.go') diff --git a/rust/androidmk.go b/rust/androidmk.go index 5a33f77fa..29e4bd75b 100644 --- a/rust/androidmk.go +++ b/rust/androidmk.go @@ -156,7 +156,7 @@ func (procMacro *procMacroDecorator) AndroidMk(ctx AndroidMkContext, ret *androi } func (sourceProvider *BaseSourceProvider) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) { - outFile := sourceProvider.OutputFile + outFile := sourceProvider.OutputFiles[0] ret.Class = "ETC" ret.OutputFile = android.OptionalPathForPath(outFile) ret.SubName += sourceProvider.subName -- cgit v1.2.3-59-g8ed1b