diff options
author | 2019-01-25 17:08:21 -0800 | |
---|---|---|
committer | 2019-02-19 12:05:02 -0800 | |
commit | 76dd005e685dbac31459dc462fe1f6f83c490a33 (patch) | |
tree | b9fa9ff166a923b14574daa260fa663a79da82a0 /cc/proto.go | |
parent | bce06b6840c1717b2c63ef7de4f6412b6ba1614c (diff) |
Add 16bit and 32bit nanopb library.
When compiling nanopb static library, we need to add 16bit or 32bit
flag if we need to use 16bit or 32bit size, default is 8bit.
Change-Id: Ib74478996cb2487accc1e46a32fba8170214c47f
Test: None
Bug: b/122292884
Diffstat (limited to 'cc/proto.go')
-rw-r--r-- | cc/proto.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cc/proto.go b/cc/proto.go index 61fd607f5..ce8a30ed7 100644 --- a/cc/proto.go +++ b/cc/proto.go @@ -112,6 +112,18 @@ func protoDeps(ctx BaseModuleContext, deps Deps, p *android.ProtoProperties, sta case "nanopb-c-enable_malloc": lib = "libprotobuf-c-nano-enable_malloc" static = true + case "nanopb-c-16bit": + lib = "libprotobuf-c-nano-16bit" + static = true + case "nanopb-c-enable_malloc-16bit": + lib = "libprotobuf-c-nano-enable_malloc-16bit" + static = true + case "nanopb-c-32bit": + lib = "libprotobuf-c-nano-32bit" + static = true + case "nanopb-c-enable_malloc-32bit": + lib = "libprotobuf-c-nano-enable_malloc-32bit" + static = true default: ctx.PropertyErrorf("proto.type", "unknown proto type %q", String(p.Proto.Type)) @@ -142,7 +154,7 @@ func protoFlags(ctx ModuleContext, flags Flags, p *android.ProtoProperties) Flag var plugin string switch String(p.Proto.Type) { - case "nanopb-c", "nanopb-c-enable_malloc": + case "nanopb-c", "nanopb-c-enable_malloc", "nanopb-c-16bit", "nanopb-c-enable_malloc-16bit", "nanopb-c-32bit", "nanopb-c-enable_malloc-32bit": flags.protoC = true flags.protoOptionsFile = true flags.protoOutTypeFlag = "--nanopb_out" |