aboutsummaryrefslogtreecommitdiff
path: root/libdex
diff options
context:
space:
mode:
authorJim Huang <jserv@0xlab.org>2011-10-02 01:16:17 +0800
committerSteve Kondik <shade@chemlab.org>2013-07-24 12:55:21 -0700
commit3805305a785f1ab68bf19aefb77a4d8d224e254b (patch)
tree8aa999c12a1844b9aa4cbf2fb2aa95576ab4b3fd /libdex
parent210ad4902c02500e55ec7e2e8b10f7079da442e2 (diff)
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 (manually cherry-picked commit 55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f)
Diffstat (limited to 'libdex')
-rw-r--r--libdex/Android.mk3
1 files changed, 1 insertions, 2 deletions
diff --git a/libdex/Android.mk b/libdex/Android.mk
index bb8d03b96..ad85ea7ea 100644
--- a/libdex/Android.mk
+++ b/libdex/Android.mk
@@ -30,7 +30,6 @@ dex_src_files := \
InstrUtils.cpp \
Leb128.cpp \
OptInvocation.cpp \
- sha1.cpp \
SysUtil.cpp \
ZipArchive.cpp
@@ -64,7 +63,7 @@ endif # !SDK_ONLY
##
##
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(dex_src_files)
+LOCAL_SRC_FILES := $(dex_src_files) sha1.cpp
LOCAL_C_INCLUDES += $(dex_include_files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libdex