From 76e3a3906116dcd57bfdffade0f27631ab0001aa Mon Sep 17 00:00:00 2001 From: Ulas Kirazci Date: Thu, 28 Mar 2013 14:02:14 -0700 Subject: [PATCH] Add a "nano" option to LOCAL_PROTOC_OPTIMIZE_TYPE. Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80 --- core/base_rules.mk | 4 ++++ core/clear_vars.mk | 2 +- core/java.mk | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index baa8932e0a..ed125fe018 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -257,7 +257,11 @@ $(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_DIR := $(proto_java_ ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),micro) $(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --javamicro_out else + ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),nano) +$(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --javanano_out + else $(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --java_out + endif endif $(proto_java_sources_file_stamp): PRIVATE_PROTOC_FLAGS := $(LOCAL_PROTOC_FLAGS) $(proto_java_sources_file_stamp) : $(proto_sources_fullpath) $(PROTOC) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index dc17ecc1d4..97514628fc 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -114,7 +114,7 @@ LOCAL_RENDERSCRIPT_FLAGS:= LOCAL_RENDERSCRIPT_TARGET_API:= LOCAL_BUILD_HOST_DEX:= LOCAL_DEX_PREOPT:= # '',true,false,nostripping -LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,full +LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,nano,full LOCAL_PROTOC_FLAGS:= LOCAL_NO_CRT:= LOCAL_PROPRIETARY_MODULE:= diff --git a/core/java.mk b/core/java.mk index 65c9be96de..973c1d2111 100644 --- a/core/java.mk +++ b/core/java.mk @@ -52,7 +52,11 @@ ifneq ($(proto_sources),) ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),micro) LOCAL_STATIC_JAVA_LIBRARIES += libprotobuf-java-2.3.0-micro else + ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),nano) + LOCAL_STATIC_JAVA_LIBRARIES += libprotobuf-java-2.3.0-nano + else LOCAL_STATIC_JAVA_LIBRARIES += libprotobuf-java-2.3.0-lite + endif endif endif