diff --git a/wa/workloads/dhrystone/__init__.py b/wa/workloads/dhrystone/__init__.py index 60b66d78..106d0483 100644 --- a/wa/workloads/dhrystone/__init__.py +++ b/wa/workloads/dhrystone/__init__.py @@ -18,10 +18,7 @@ import os import re -from wa import Workload, Parameter, ConfigError - - -this_dir = os.path.dirname(__file__) +from wa import Workload, Parameter, ConfigError, Executable class Dhrystone(Workload): @@ -75,7 +72,8 @@ class Dhrystone(Workload): ] def initialize(self, context): - host_exe = os.path.join(this_dir, 'dhrystone') + resource = Executable(self, self.target.abi, 'dhrystone') + host_exe = context.resolver.get(resource) Dhrystone.target_exe = self.target.install(host_exe) def setup(self, context): diff --git a/wa/workloads/dhrystone/bin/arm64/dhrystone b/wa/workloads/dhrystone/bin/arm64/dhrystone new file mode 100755 index 00000000..d88dca21 Binary files /dev/null and b/wa/workloads/dhrystone/bin/arm64/dhrystone differ diff --git a/wa/workloads/dhrystone/bin/armeabi/dhrystone b/wa/workloads/dhrystone/bin/armeabi/dhrystone new file mode 100755 index 00000000..cf05362e Binary files /dev/null and b/wa/workloads/dhrystone/bin/armeabi/dhrystone differ diff --git a/wa/workloads/dhrystone/dhrystone b/wa/workloads/dhrystone/dhrystone deleted file mode 100755 index 68cd9b71..00000000 Binary files a/wa/workloads/dhrystone/dhrystone and /dev/null differ diff --git a/wa/workloads/dhrystone/src/build.sh b/wa/workloads/dhrystone/src/Makefile old mode 100755 new mode 100644 similarity index 80% rename from wa/workloads/dhrystone/src/build.sh rename to wa/workloads/dhrystone/src/Makefile index 61fcce5d..4a7ce8f5 --- a/wa/workloads/dhrystone/src/build.sh +++ b/wa/workloads/dhrystone/src/Makefile @@ -13,11 +13,5 @@ # limitations under the License. # - -ndk-build -if [[ -f libs/armeabi/dhrystone ]]; then - echo "Dhrystone binary updated." - cp libs/armeabi/dhrystone .. - rm -rf libs - rm -rf obj -fi +dhrystone: dhrystone.c + $(CROSS_COMPILE)gcc -O3 -static dhrystone.c -o dhrystone diff --git a/wa/workloads/dhrystone/src/jni/dhrystone.c b/wa/workloads/dhrystone/src/dhrystone.c similarity index 100% rename from wa/workloads/dhrystone/src/jni/dhrystone.c rename to wa/workloads/dhrystone/src/dhrystone.c diff --git a/wa/workloads/dhrystone/src/jni/Android.mk b/wa/workloads/dhrystone/src/jni/Android.mk deleted file mode 100644 index 2f974319..00000000 --- a/wa/workloads/dhrystone/src/jni/Android.mk +++ /dev/null @@ -1,11 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES:= dhrystone.c -LOCAL_MODULE := dhrystone -LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libc -LOCAL_SHARED_LIBRARIES := liblog -LOCAL_LDLIBS := -llog -LOCAL_CFLAGS := -O2 -include $(BUILD_EXECUTABLE)