Merge "Revert "Revert "Enable compilation of secondary dex files"""
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index daeb447..1d64d6d 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1873,7 +1873,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 b360f67..d13d990 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -333,9 +333,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