Explicitly give compiler options to test scripts
This makes tests pass when ART_USE_OPTIMIZING_COMPILER=true.
Change-Id: I579c0371033435ead6b06830f15c00dbf7e98005
diff --git a/build/Android.oat.mk b/build/Android.oat.mk
index e8b363b..523d143 100644
--- a/build/Android.oat.mk
+++ b/build/Android.oat.mk
@@ -44,6 +44,9 @@
core_pic_infix :=
core_dex2oat_dependency := $(DEX2OAT_DEPENDENCY)
+ ifeq ($(1),default)
+ core_compile_options += --compiler-backend=Quick
+ endif
ifeq ($(1),optimizing)
core_compile_options += --compiler-backend=Optimizing
# With the optimizing compiler, we want to rerun dex2oat whenever there is
@@ -137,6 +140,9 @@
core_pic_infix :=
core_dex2oat_dependency := $(DEX2OAT_DEPENDENCY)
+ ifeq ($(1),default)
+ core_compile_options += --compiler-backend=Quick
+ endif
ifeq ($(1),optimizing)
ifeq ($($(3)TARGET_ARCH),arm64)
# TODO: Enable image generation on arm64 once the backend
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index 3c959fb..b85685b 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -472,6 +472,7 @@
else
ifeq ($(4),default)
test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES
+ run_test_options += --quick
else
$$(error found $(4) expected $(COMPILER_TYPES))
endif
diff --git a/test/run-test b/test/run-test
index 6b8f007..2abc1fa 100755
--- a/test/run-test
+++ b/test/run-test
@@ -194,6 +194,9 @@
run_args="${run_args} -Xcompiler-option --compiler-backend=Optimizing"
image_suffix="-optimizing"
shift
+ elif [ "x$1" = "x--quick" ]; then
+ run_args="${run_args} -Xcompiler-option --compiler-backend=Quick"
+ shift
elif [ "x$1" = "x--no-verify" ]; then
run_args="${run_args} --no-verify"
shift
@@ -421,6 +424,7 @@
echo " --build-only Build test files only (off by default)."
echo " --interpreter Enable interpreter only mode (off by default)."
echo " --optimizing Enable optimizing compiler (off by default)."
+ echo " --quick Use Quick compiler (default)."
echo " --no-verify Turn off verification (on by default)."
echo " --no-optimize Turn off optimization (on by default)."
echo " --no-precise Turn off precise GC (on by default)."