diff options
author | Ying Wang <wangying@google.com> | 2011-10-24 12:17:03 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2011-10-24 12:29:25 -0700 |
commit | 79e3dec83ee012e94e34ed092cea5b9d60040e9d (patch) | |
tree | 8d83935f67800f734c276959adf3108827c6e56b /core/java_library.mk | |
parent | 07767a9e748fdbdab2297974ad01cb265e7fb5a9 (diff) | |
download | build-79e3dec83ee012e94e34ed092cea5b9d60040e9d.zip build-79e3dec83ee012e94e34ed092cea5b9d60040e9d.tar.gz build-79e3dec83ee012e94e34ed092cea5b9d60040e9d.tar.bz2 |
new LOCAL_DEX_PREOPT option "nostripping"
Set "LOCAL_DEX_PREOPT := nostripping" to do dex-preopt while not strip
the classes.dex.
Bug: 5396625 5502338
Change-Id: Ie8dea4414ebeefeae89c6433b246faea27baa5e7
Diffstat (limited to 'core/java_library.mk')
-rw-r--r-- | core/java_library.mk | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java_library.mk b/core/java_library.mk index 23417d0..fa40c0e 100644 --- a/core/java_library.mk +++ b/core/java_library.mk @@ -29,13 +29,18 @@ intermediates.COMMON := $(call local-intermediates-dir,COMMON) common_javalib.jar := $(intermediates.COMMON)/$(LOCAL_BUILT_MODULE_STEM) LOCAL_INTERMEDIATE_TARGETS += $(common_javalib.jar) -ifeq (true,$(WITH_DEXPREOPT)) +ifneq (true,$(WITH_DEXPREOPT)) +LOCAL_DEX_PREOPT := +else ifeq (,$(TARGET_BUILD_APPS)) ifndef LOCAL_DEX_PREOPT LOCAL_DEX_PREOPT := true endif endif endif +ifeq (false,$(LOCAL_DEX_PREOPT)) +LOCAL_DEX_PREOPT := +endif ################################# include $(BUILD_SYSTEM)/java.mk @@ -64,7 +69,7 @@ ifneq ($(extra_jar_args),) $(add-java-resources-to-package) endif -ifeq ($(LOCAL_DEX_PREOPT),true) +ifdef LOCAL_DEX_PREOPT dexpreopt_boot_jar_module := $(filter $(LOCAL_MODULE),$(DEXPREOPT_BOOT_JARS_MODULES)) ifneq ($(dexpreopt_boot_jar_module),) # boot jar's rules are defined in dex_preopt.mk @@ -89,7 +94,9 @@ $(built_odex) : $(common_javalib.jar) | $(DEXPREOPT) $(DEXOPT) $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP) $(AAPT) $(call copy-file-to-target) +ifneq (nostripping,$(LOCAL_DEX_PREOPT)) $(call dexpreopt-remove-classes.dex,$@) +endif endif # dexpreopt_boot_jar_module |