Enable darwin target build for art.

Change-Id: I8fc04258360d663d2fcd07c307fdfdd2981cdd19
diff --git a/compiler/Android.mk b/compiler/Android.mk
index 0bb8770..a0ad48d 100644
--- a/compiler/Android.mk
+++ b/compiler/Android.mk
@@ -221,12 +221,14 @@
 ifeq ($(ART_BUILD_TARGET_DEBUG),true)
   $(eval $(call build-libart-compiler,target,debug))
 endif
-# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
-ifeq ($(ART_BUILD_NDEBUG),true)
-  $(eval $(call build-libart-compiler,host,ndebug))
-endif
-ifeq ($(ART_BUILD_DEBUG),true)
-  $(eval $(call build-libart-compiler,host,debug))
+ifeq ($(WITH_HOST_DALVIK),true)
+  # We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
+  ifeq ($(ART_BUILD_NDEBUG),true)
+    $(eval $(call build-libart-compiler,host,ndebug))
+  endif
+  ifeq ($(ART_BUILD_DEBUG),true)
+    $(eval $(call build-libart-compiler,host,debug))
+  endif
 endif
 
 # Rule to build /system/lib/libcompiler_rt.a