Fix test-art-target on the Mac.

We only want to avoid using GNU ld options when building host binaries for the
Mac.

Change-Id: I10da9dcbb74ebf68877d16384c962daf40c8d56c
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index f665e0f..ca80ae8 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -45,9 +45,9 @@
   LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
   LOCAL_SHARED_LIBRARIES := libartd
 
-  # Mac OS linker doesn't understand --export-dynamic
-  ifeq ($(HOST_OS),linux)
-    # options to allow jni_compiler_test to find Java_MyClass_bar within itself using dlopen(NULL, )
+  # Mac OS linker doesn't understand --export-dynamic.
+  ifneq ($(HOST_OS)-$$(art_target_or_host),darwin-host)
+    # Allow jni_compiler_test to find Java_MyClass_bar within itself using dlopen(NULL, ...).
     LOCAL_LDFLAGS := -Wl,--export-dynamic -Wl,-u,Java_MyClass_bar
   endif