Add missing JIT stuff in make files

Was causing core.oat to not be created.

Bug: 19524713
Change-Id: I5da005fd36f9682623fdda9931280997b59c2681
diff --git a/Android.mk b/Android.mk
index 76c3aa5..447cf66 100644
--- a/Android.mk
+++ b/Android.mk
@@ -202,6 +202,11 @@
 test-art-host-interpreter: test-art-host-run-test-interpreter
 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
 
+# All host tests that run solely on the jit.
+.PHONY: test-art-host-jit
+test-art-host-jit: test-art-host-run-test-jit
+	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
+
 # Primary host architecture variants:
 .PHONY: test-art-host$(ART_PHONY_TEST_HOST_SUFFIX)
 test-art-host$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(ART_PHONY_TEST_HOST_SUFFIX) \
@@ -220,6 +225,10 @@
 test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
 
+.PHONY: test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX)
+test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(ART_PHONY_TEST_HOST_SUFFIX)
+	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
+
 # Secondary host architecture variants:
 ifneq ($(HOST_PREFER_32_BIT),true)
 .PHONY: test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
@@ -238,6 +247,10 @@
 .PHONY: test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
 test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
+
+.PHONY: test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
+test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
+	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
 endif
 
 # Valgrind. Currently only 32b gtests.
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk
index da50d53..547e92e 100644
--- a/build/Android.common_test.mk
+++ b/build/Android.common_test.mk
@@ -46,6 +46,9 @@
 # Do you want interpreter tests run?
 ART_TEST_INTERPRETER ?= $(ART_TEST_FULL)
 
+# Do you want JIT tests run?
+ART_TEST_JIT ?= $(ART_TEST_FULL)
+
 # Do you want optimizing compiler tests run?
 ART_TEST_OPTIMIZING ?= $(ART_TEST_FULL)
 
diff --git a/build/Android.oat.mk b/build/Android.oat.mk
index 8d49565..22ecb01 100644
--- a/build/Android.oat.mk
+++ b/build/Android.oat.mk
@@ -31,7 +31,7 @@
 endif
 
 # Use dex2oat debug version for better error reporting
-# $(1): compiler - default, optimizing or interpreter.
+# $(1): compiler - default, optimizing, jit or interpreter.
 # $(2): pic/no-pic
 # $(3): 2ND_ or undefined, 2ND_ for 32-bit host builds.
 # $(4): wrapper, e.g., valgrind.
@@ -64,12 +64,16 @@
     core_compile_options += --compiler-filter=interpret-only
     core_infix := -interpreter
   endif
+  ifeq ($(1),jit)
+    core_compile_options += --compiler-filter=interpret-only
+    core_infix := -jit
+  endif
   ifeq ($(1),default)
     # Default has no infix, no compile options.
   endif
-  ifneq ($(filter-out default interpreter optimizing,$(1)),)
+  ifneq ($(filter-out default interpreter jit optimizing,$(1)),)
     #Technically this test is not precise, but hopefully good enough.
-    $$(error found $(1) expected default, interpreter or optimizing)
+    $$(error found $(1) expected default, interpreter, jit or optimizing)
   endif
 
   ifeq ($(2),pic)
@@ -127,7 +131,7 @@
   core_pic_infix :=
 endef  # create-core-oat-host-rules
 
-# $(1): compiler - default, optimizing or interpreter.
+# $(1): compiler - default, optimizing, jit or interpreter.
 # $(2): wrapper.
 # $(3): dex2oat suffix.
 define create-core-oat-host-rule-combination
@@ -143,12 +147,14 @@
 $(eval $(call create-core-oat-host-rule-combination,default,,))
 $(eval $(call create-core-oat-host-rule-combination,optimizing,,))
 $(eval $(call create-core-oat-host-rule-combination,interpreter,,))
+$(eval $(call create-core-oat-host-rule-combination,jit,,))
 
 valgrindHOST_CORE_IMG_OUTS :=
 valgrindHOST_CORE_OAT_OUTS :=
 $(eval $(call create-core-oat-host-rule-combination,default,valgrind,32))
 $(eval $(call create-core-oat-host-rule-combination,optimizing,valgrind,32))
 $(eval $(call create-core-oat-host-rule-combination,interpreter,valgrind,32))
+$(eval $(call create-core-oat-host-rule-combination,jit,valgrind,32))
 
 valgrind-test-art-host-dex2oat-host: $(valgrindHOST_CORE_IMG_OUTS)
 
@@ -178,12 +184,16 @@
     core_compile_options += --compiler-filter=interpret-only
     core_infix := -interpreter
   endif
+  ifeq ($(1),jit)
+    core_compile_options += --compiler-filter=interpret-only
+    core_infix := -jit
+  endif
   ifeq ($(1),default)
     # Default has no infix, no compile options.
   endif
-  ifneq ($(filter-out default interpreter optimizing,$(1)),)
+  ifneq ($(filter-out default interpreter jit optimizing,$(1)),)
     # Technically this test is not precise, but hopefully good enough.
-    $$(error found $(1) expected default, interpreter or optimizing)
+    $$(error found $(1) expected default, interpreter, jit or optimizing)
   endif
 
   ifeq ($(2),pic)
@@ -245,7 +255,7 @@
   core_pic_infix :=
 endef  # create-core-oat-target-rules
 
-# $(1): compiler - default, optimizing or interpreter.
+# $(1): compiler - default, optimizing, jit or interpreter.
 # $(2): wrapper.
 # $(3): dex2oat suffix.
 define create-core-oat-target-rule-combination
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index 41c8da6..e5a07d4 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -437,7 +437,7 @@
 
 # Create a rule to build and run a tests following the form:
 # test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
-#    {4: interpreter default optimizing}-{5: relocate no-relocate relocate-no-patchoat}-
+#    {4: interpreter default optimizing jit}-{5: relocate no-relocate relocate-no-patchoat}-
 #    {6: trace or no-trace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
 #    {9: no-image image picimage}-{10: pictest nopictest}-{11: test name}{12: 32 or 64}
 define define-test-art-run-test
@@ -501,7 +501,7 @@
         run_test_options += --quick
       else
         ifeq ($(4),jit)
-          test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES
+          test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
           run_test_options += --jit
         else
           $$(error found $(4) expected $(COMPILER_TYPES))