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/package.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/package.mk')
-rw-r--r-- | core/package.mk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/package.mk b/core/package.mk index 07cdbd0..0cca209 100644 --- a/core/package.mk +++ b/core/package.mk @@ -147,7 +147,9 @@ endif # all_resources endif # !custom LOCAL_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_PROGUARD_FLAGS) -ifeq (true,$(WITH_DEXPREOPT)) +ifneq (true,$(WITH_DEXPREOPT)) +LOCAL_DEX_PREOPT := +else ifeq (,$(TARGET_BUILD_APPS)) ifneq (,$(LOCAL_SRC_FILES)) ifndef LOCAL_DEX_PREOPT @@ -156,6 +158,9 @@ endif endif endif endif +ifeq (false,$(LOCAL_DEX_PREOPT)) +LOCAL_DEX_PREOPT := +endif ################################# include $(BUILD_SYSTEM)/java.mk @@ -332,7 +337,7 @@ PACKAGES.$(LOCAL_PACKAGE_NAME).CERTIFICATE := $(certificate) # Define the rule to build the actual package. $(LOCAL_BUILT_MODULE): $(AAPT) | $(ZIPALIGN) -ifeq ($(LOCAL_DEX_PREOPT),true) +ifdef LOCAL_DEX_PREOPT # Make sure the boot jars get dexpreopt-ed first $(LOCAL_BUILT_MODULE): $(DEXPREOPT_BOOT_ODEXS) | $(DEXPREOPT) $(DEXOPT) endif @@ -362,10 +367,12 @@ endif $(sign-package) @# Alignment must happen after all other zip operations. $(align-package) -ifeq ($(LOCAL_DEX_PREOPT),true) +ifdef LOCAL_DEX_PREOPT $(hide) rm -f $(patsubst %.apk,%.odex,$@) $(call dexpreopt-one-file,$@,$(patsubst %.apk,%.odex,$@)) +ifneq (nostripping,$(LOCAL_DEX_PREOPT)) $(call dexpreopt-remove-classes.dex,$@) +endif built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex $(built_odex): $(LOCAL_BUILT_MODULE) |