Revert "Revert "Enable compilation of secondary dex files""
Bug: 26719109
This reverts commit d98a52f0bc6c58e8e538de8335ab9bcb6ae73aa7.
Change-Id: I523675eb6d647fe773dd57b6e1cc398927bb066e
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index c2d2dca..4b45b42 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1883,7 +1883,7 @@
void Runtime::AddCurrentRuntimeFeaturesAsDex2OatArguments(std::vector<std::string>* argv)
const {
- if (GetInstrumentation()->InterpretOnly() || UseJit()) {
+ if (GetInstrumentation()->InterpretOnly()) {
argv->push_back("--compiler-filter=interpret-only");
}
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 2db1e6c..762d9a4 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -329,9 +329,17 @@
INT_OPTS="-Xusejit:true"
if [ "$VERIFY" = "y" ] ; then
COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-at-runtime"
+ if [ "$PREBUILD" = "n" ]; then
+ # Make sure that if we have noprebuild we still JIT as DexClassLoader will
+ # try to compile the dex file.
+ INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-at-runtime"
+ fi
else
COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-none"
DEX_VERIFY="${DEX_VERIFY} -Xverify:none"
+ if [ "$PREBUILD" = "n" ]; then
+ INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-none"
+ fi
fi
fi