diff options
| author | Jim Huang <jserv@0xlab.org> | 2011-10-02 01:16:17 +0800 |
|---|---|---|
| committer | Jim Huang <jserv@0xlab.org> | 2011-10-02 01:17:38 +0800 |
| commit | 55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f (patch) | |
| tree | 4a058de25aebb06175704afcf9442059806ba6cc | |
| parent | 895c9616049cd6a0922ce8afb961ae284593d0bb (diff) | |
| download | android_dalvik-55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f.tar.gz android_dalvik-55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f.tar.bz2 android_dalvik-55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f.zip | |
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
| -rw-r--r-- | libdex/Android.mk | 3 |
1 files changed, 1 insertions, 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 |
