Add dex_lang as common frontend to lir and LLVM. dex_lang + bc2lir =
Greenland
First commit of Greenland compiler: It's working in the sense of oat
tests. E.g., mm test-art-host-oat-Fibonacci. It shows the correct
bitcode before lir.
Change-Id: I91cbb02188325eb1fa605ed71ec7108fd2b0dbb9
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 9af92da..33c33af 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -22,7 +22,23 @@
ART_USE_LLVM_COMPILER := false
endif
-ifeq ($(ART_USE_LLVM_COMPILER),true)
+ifneq ($(wildcard art/USE_GREENLAND_COMPILER),)
+ART_USE_GREENLAND_COMPILER := true
+else
+ART_USE_GREENLAND_COMPILER := false
+endif
+
+ifeq ($(filter-out true,$(ART_USE_LLVM_COMPILER) $(ART_USE_GREENLAND_COMPILER)),)
+$(error Cannot enable art-greenland and art-llvm compiler simultaneously!)
+endif
+
+ifeq ($(filter true,$(ART_USE_LLVM_COMPILER) $(ART_USE_GREENLAND_COMPILER)),true)
+ART_REQUIRE_LLVM := true
+else
+ART_REQUIRE_LLVM := false
+endif
+
+ifeq ($(ART_REQUIRE_LLVM),true)
LLVM_ROOT_PATH := external/llvm
include $(LLVM_ROOT_PATH)/llvm.mk
endif
@@ -209,6 +225,11 @@
src/compiler_llvm/runtime_support_llvm.cc
endif
+ifeq ($(ART_USE_GREENLAND_COMPILER),true)
+LIBART_COMMON_SRC_FILES += \
+ src/greenland/inferred_reg_category_map.cc
+endif
+
LIBART_COMMON_SRC_FILES += \
src/oat/runtime/context.cc \
src/oat/runtime/support_alloc.cc \