From 55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Sun, 2 Oct 2011 01:16:17 +0800 Subject: Exclude sha1.c when building libdex for device In bionic, there is already an optimized SHA-1 hash implementation, and the file 'sha1.c' in libdex is almost identical. It is only necessary to build sha1.c for host version of libdex. In addition, the SHA-1 hash implementation in bionic is slightly faster than the one included in libdex. Here is the reference SHA-1 benchmark on Nexus S: [libdex] Rounds: 100000, size: 6250K, time: 1.28s, speed: 4.768 MB/s [bionic] Rounds: 100000, size: 6250K, time: 1.184s, speed: 5.156 MB/s Change-Id: Ia8918aeaeec75aceecbbb8cd55130d709a9fe311 --- libdex/Android.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libdex/Android.mk b/libdex/Android.mk index 558a7e5ba..575aca5c6 100644 --- a/libdex/Android.mk +++ b/libdex/Android.mk @@ -28,7 +28,6 @@ dex_src_files := \ Leb128.c \ OpCodeNames.c \ OptInvocation.c \ - sha1.c \ SysUtil.c \ ZipArchive.c @@ -61,7 +60,7 @@ endif # !SDK_ONLY ## ## include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(dex_src_files) +LOCAL_SRC_FILES := $(dex_src_files) sha1.c LOCAL_C_INCLUDES += $(dex_include_files) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libdex -- cgit v1.2.3