summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-04-15 19:58:20 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-15 19:58:21 +0000
commit03c6e8c58686ffe611952d363de21b54f813ca41 (patch)
treec91f0f6b66569bcf2c1a7f651f1d71b9b136904f
parent8b75ec1c7b6efa79f358725d0fd7a3932fd273e5 (diff)
parentdff3755a939a4f69475f22a110fa632981e002f5 (diff)
downloadbuild-03c6e8c58686ffe611952d363de21b54f813ca41.zip
build-03c6e8c58686ffe611952d363de21b54f813ca41.tar.gz
build-03c6e8c58686ffe611952d363de21b54f813ca41.tar.bz2
Merge "Move package signing after file stripping"
-rw-r--r--core/package_internal.mk2
-rw-r--r--core/prebuilt_internal.mk7
2 files changed, 5 insertions, 4 deletions
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 5dac455..016e23f 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -402,12 +402,12 @@ ifeq ($(full_classes_jar),)
else
$(add-dex-to-package)
endif
- $(sign-package)
ifdef LOCAL_DEX_PREOPT
ifneq (nostripping,$(LOCAL_DEX_PREOPT))
$(call dexpreopt-remove-classes.dex,$@)
endif
endif
+ $(sign-package)
@# Alignment must happen after all other zip operations.
$(align-package)
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index d544619..8595bce 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -193,17 +193,18 @@ include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
$(built_module) : PRIVATE_PAGE_ALIGN_JNI_SHARED_LIBRARIES := $(LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES)
$(built_module) : $(my_prebuilt_src_file) | $(ACP) $(ZIPALIGN) $(SIGNAPK_JAR)
$(transform-prebuilt-to-target)
+ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
+ @# Only strip out files if we can re-sign the package.
ifdef extracted_jni_libs
$(hide) zip -d $@ 'lib/*.so' # strip embedded JNI libraries.
endif
-ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
- $(sign-package)
-endif
ifdef LOCAL_DEX_PREOPT
ifneq (nostripping,$(LOCAL_DEX_PREOPT))
$(call dexpreopt-remove-classes.dex,$@)
endif
endif
+ $(sign-package)
+endif
$(align-package)
###############################