Fix mac build: use -lrt only on linux.
Change-Id: I25e6058d9003fa52ef3c8bd153c2108712ce7f96
diff --git a/build/Android.executable.mk b/build/Android.executable.mk
index fdb2be1..a251c92 100644
--- a/build/Android.executable.mk
+++ b/build/Android.executable.mk
@@ -93,14 +93,18 @@
else
LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
endif
+ LOCAL_LDLIBS += -lpthread -ldl
ifeq ($$(art_static_or_shared),static)
LOCAL_LDFLAGS += -static
# We need this because GC stress mode makes use of _Unwind_GetIP and _Unwind_Backtrace and
# the symbols are also defined in libgcc_eh.a(unwind-dw2.o)
# TODO: Having this is not ideal as it might obscure errors. Try to get rid of it.
LOCAL_LDFLAGS += -z muldefs
+ ifeq ($$(HOST_OS),linux)
+ LOCAL_LDLIBS += -lrt
+ endif
endif
- LOCAL_LDLIBS += -lpthread -ldl -lrt
+
endif
# If dynamically linked add libart by default. Statically linked executables