Enable darwin target build for art.
Change-Id: I8fc04258360d663d2fcd07c307fdfdd2981cdd19
diff --git a/Android.mk b/Android.mk
index 2e29385..6c68428 100644
--- a/Android.mk
+++ b/Android.mk
@@ -78,15 +78,6 @@
adb shell rm system/app/*.odex
adb shell rm data/run-test/test-*/dalvik-cache/*@classes.dex
-########################################################################
-# darwin build
-
-# we aren't building most of art on darwin right now, but we do need to build new dalvikvm
-ifeq ($(HOST_OS),darwin)
-art_dont_bother := true
-include $(art_path)/dalvikvm/Android.mk
-endif
-
ifneq ($(art_dont_bother),true)
########################################################################
diff --git a/build/Android.common.mk b/build/Android.common.mk
index fcaa2bd..bfb1f9b 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -25,8 +25,8 @@
#
ART_BUILD_TARGET_NDEBUG ?= true
ART_BUILD_TARGET_DEBUG ?= true
-ART_BUILD_HOST_NDEBUG ?= true
-ART_BUILD_HOST_DEBUG ?= true
+ART_BUILD_HOST_NDEBUG ?= $(WITH_HOST_DALVIK)
+ART_BUILD_HOST_DEBUG ?= $(WITH_HOST_DALVIK)
ifeq ($(ART_BUILD_TARGET_NDEBUG),false)
$(info Disabling ART_BUILD_TARGET_NDEBUG)
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index 2b677be..a59e087 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -163,6 +163,8 @@
ifeq ($(ART_BUILD_TARGET),true)
$(foreach file,$(TEST_TARGET_SRC_FILES), $(eval $(call build-art-test,target,$(file))))
endif
-ifeq ($(ART_BUILD_HOST),true)
- $(foreach file,$(TEST_HOST_SRC_FILES), $(eval $(call build-art-test,host,$(file))))
+ifeq ($(WITH_HOST_DALVIK),true)
+ ifeq ($(ART_BUILD_HOST),true)
+ $(foreach file,$(TEST_HOST_SRC_FILES), $(eval $(call build-art-test,host,$(file))))
+ endif
endif
diff --git a/build/Android.libarttest.mk b/build/Android.libarttest.mk
index 239f6c1..54a3859 100644
--- a/build/Android.libarttest.mk
+++ b/build/Android.libarttest.mk
@@ -64,6 +64,8 @@
ifeq ($(ART_BUILD_TARGET),true)
$(eval $(call build-libarttest,target))
endif
-ifeq ($(ART_BUILD_HOST),true)
- $(eval $(call build-libarttest,host))
+ifeq ($(WITH_HOST_DALVIK),true)
+ ifeq ($(ART_BUILD_HOST),true)
+ $(eval $(call build-libarttest,host))
+ endif
endif
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
diff --git a/dex2oat/Android.mk b/dex2oat/Android.mk
index 7bcf762..5cfab51 100644
--- a/dex2oat/Android.mk
+++ b/dex2oat/Android.mk
@@ -28,10 +28,12 @@
$(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,art/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-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,art/compiler,host,ndebug))
-endif
-ifeq ($(ART_BUILD_NDEBUG),true)
- $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,art/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-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,art/compiler,host,ndebug))
+ endif
+ ifeq ($(ART_BUILD_NDEBUG),true)
+ $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,art/compiler,host,debug))
+ endif
endif
diff --git a/oatdump/Android.mk b/oatdump/Android.mk
index faa90ae..bf5c41b 100644
--- a/oatdump/Android.mk
+++ b/oatdump/Android.mk
@@ -28,9 +28,11 @@
$(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,target,debug))
endif
-ifeq ($(ART_BUILD_HOST_NDEBUG),true)
- $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,host,ndebug))
-endif
-ifeq ($(ART_BUILD_HOST_DEBUG),true)
- $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,host,debug))
+ifeq ($(WITH_HOST_DALVIK),true)
+ ifeq ($(ART_BUILD_HOST_NDEBUG),true)
+ $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,host,ndebug))
+ endif
+ ifeq ($(ART_BUILD_HOST_DEBUG),true)
+ $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,host,debug))
+ endif
endif
diff --git a/runtime/Android.mk b/runtime/Android.mk
index 5bcd3fb..bae7124 100644
--- a/runtime/Android.mk
+++ b/runtime/Android.mk
@@ -366,9 +366,11 @@
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,host,ndebug))
-endif
-ifeq ($(ART_BUILD_DEBUG),true)
- $(eval $(call build-libart,host,debug))
+ifeq ($(WITH_HOST_DALVIK),true)
+ ifeq ($(ART_BUILD_NDEBUG),true)
+ $(eval $(call build-libart,host,ndebug))
+ endif
+ ifeq ($(ART_BUILD_DEBUG),true)
+ $(eval $(call build-libart,host,debug))
+ endif
endif