summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-01-26 16:54:40 -0800
committerChristopher Ferris <cferris@google.com>2015-01-26 16:54:40 -0800
commit941a1a191fc86893a7ef48926c788eb32ffa81da (patch)
tree91a20f887e98e83f2ff0cabfa44f390673a2af0b
parent419ed122aa21cf04334f21baab135ac4f9f49840 (diff)
downloadbionic-941a1a191fc86893a7ef48926c788eb32ffa81da.zip
bionic-941a1a191fc86893a7ef48926c788eb32ffa81da.tar.gz
bionic-941a1a191fc86893a7ef48926c788eb32ffa81da.tar.bz2
Do not build host benchmark code on macs.
Macs don't have clock_gettime, and it doesn't seem worth getting this to run on the host for mac. Change-Id: I59d9939acc2ede1308b24a60c4242d45355d967d
-rw-r--r--benchmarks/Android.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index 989e9e6..c3eb6d3 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -28,6 +28,9 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
include $(BUILD_STATIC_LIBRARY)
+# Only supported on linux systems.
+ifeq ($(HOST_OS),linux)
+
include $(CLEAR_VARS)
LOCAL_MODULE := libbenchmark
LOCAL_CFLAGS += -O2 -Wall -Wextra -Werror
@@ -37,6 +40,8 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_MULTILIB := both
include $(BUILD_HOST_STATIC_LIBRARY)
+endif
+
# -----------------------------------------------------------------------------
# Benchmarks.
# -----------------------------------------------------------------------------
@@ -76,6 +81,9 @@ include $(BUILD_EXECUTABLE)
# performance of the old release's libc, and a static benchmark isn't
# going to let you do that.
+# Only supported on linux systems.
+ifeq ($(HOST_OS),linux)
+
# Build benchmarks for the host (against glibc!). Run with:
include $(CLEAR_VARS)
LOCAL_MODULE := bionic-benchmarks-glibc
@@ -88,6 +96,8 @@ LOCAL_SRC_FILES := $(benchmark_src_files)
LOCAL_STATIC_LIBRARIES += libbenchmark
include $(BUILD_HOST_EXECUTABLE)
+endif
+
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
include $(LOCAL_PATH)/../build/run-on-host.mk