summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk7
-rw-r--r--dex2oat/dex2oat.cc16
-rw-r--r--test/Android.mk6
3 files changed, 26 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index a051152564..46a7c1ec3e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -181,6 +181,10 @@ test-art-host-run-test-interpreter-$(1): test-art-host-dependencies
@echo test-art-host-run-test-interpreter-$(1) PASSED
TEST_ART_HOST_RUN_TEST_INTERPRETER_TARGETS += test-art-host-run-test-interpreter-$(1)
+
+.PHONY: test-art-host-run-test-$(1)
+test-art-host-run-test-$(1): test-art-host-run-test-default-$(1) test-art-host-run-test-interpreter-$(1)
+
endef
$(foreach test, $(wildcard art/test/[0-9]*), $(eval $(call declare-test-art-host-run-test,$(notdir $(test)))))
@@ -228,6 +232,9 @@ test-art-target-run-test-$(1): test-art-target-sync
@echo test-art-target-run-test-$(1) PASSED
TEST_ART_TARGET_RUN_TEST_TARGETS += test-art-target-run-test-$(1)
+
+test-art-run-test-$(1): test-art-host-run-test-$(1) test-art-target-run-test-$(1)
+
endef
$(foreach test, $(wildcard art/test/[0-9]*), $(eval $(call declare-test-art-target-run-test,$(notdir $(test)))))
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 8ec13bf4b5..5c96d742d9 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -828,6 +828,19 @@ static int dex2oat(int argc, char** argv) {
timings.StartSplit("dex2oat Setup");
LOG(INFO) << "dex2oat: " << oat_location;
+ if (image) {
+ bool has_compiler_filter = false;
+ for (const char* r : runtime_args) {
+ if (strncmp(r, "-compiler-filter:", 17) == 0) {
+ has_compiler_filter = true;
+ break;
+ }
+ }
+ if (!has_compiler_filter) {
+ runtime_args.push_back("-compiler-filter:everything");
+ }
+ }
+
Runtime::Options options;
options.push_back(std::make_pair("compiler", reinterpret_cast<void*>(NULL)));
std::vector<const DexFile*> boot_class_path;
@@ -865,9 +878,6 @@ static int dex2oat(int argc, char** argv) {
// If we're doing the image, override the compiler filter to force full compilation. Must be
// done ahead of WellKnownClasses::Init that causes verification. Note: doesn't force
// compilation of class initializers.
- if (image) {
- Runtime::Current()->SetCompilerFilter(Runtime::kEverything);
- }
// Whilst we're in native take the opportunity to initialize well known classes.
WellKnownClasses::Init(self->GetJniEnv());
diff --git a/test/Android.mk b/test/Android.mk
index 596c411e9c..6f498e8c02 100644
--- a/test/Android.mk
+++ b/test/Android.mk
@@ -133,6 +133,12 @@ test-art-host-oat-interpreter-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1)
&& echo test-art-host-oat-interpreter-$(1) PASSED || (echo test-art-host-oat-interpreter-$(1) FAILED && exit 1)
$(hide) rm -r /tmp/android-data/test-art-host-oat-interpreter-$(1)
+.PHONY: test-art-host-oat-$(1)
+test-art-host-oat-$(1): test-art-host-oat-default-$(1) test-art-host-oat-interpreter-$(1)
+
+.PHONY: test-art-oat-$(1)
+test-art-oat-$(1): test-art-host-oat-$(1) test-art-target-oat-$(1)
+
ART_TEST_TARGET_OAT_TARGETS += test-art-target-oat-$(1)
ART_TEST_HOST_OAT_DEFAULT_TARGETS += test-art-host-oat-default-$(1)
ART_TEST_HOST_OAT_INTERPRETER_TARGETS += test-art-host-oat-interpreter-$(1)