2 # Copyright (C) 2011 The Android Open Source Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 LOCAL_PATH := $(call my-dir)
19 art_path := $(LOCAL_PATH)
21 ########################################################################
25 include $(art_path)/build/Android.common_path.mk
26 include $(art_path)/build/Android.oat.mk
28 # Following the example of build's dont_bother for clean targets.
29 art_dont_bother := false
30 ifneq (,$(filter clean-oat%,$(MAKECMDGOALS)))
31 art_dont_bother := true
34 # Don't bother with tests unless there is a test-art*, build-art*, or related target.
35 art_test_bother := false
36 ifneq (,$(filter tests test-art% valgrind-test-art% build-art% checkbuild,$(MAKECMDGOALS)))
37 art_test_bother := true
41 clean-oat: clean-oat-host clean-oat-target
43 .PHONY: clean-oat-host
45 find $(OUT_DIR) -name "*.oat" -o -name "*.odex" -o -name "*.art" | xargs rm -f
47 rm -rf $(TMPDIR)/$(USER)/test-*/dalvik-cache/*
48 rm -rf $(TMPDIR)/android-data/dalvik-cache/*
50 rm -rf /tmp/$(USER)/test-*/dalvik-cache/*
51 rm -rf /tmp/android-data/dalvik-cache/*
54 .PHONY: clean-oat-target
57 adb wait-for-device remount
58 adb shell rm -rf $(ART_TARGET_NATIVETEST_DIR)
59 adb shell rm -rf $(ART_TARGET_TEST_DIR)
60 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*/*
61 adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$(DEX2OAT_TARGET_ARCH)
62 adb shell rm -rf system/app/$(DEX2OAT_TARGET_ARCH)
64 adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)
65 adb shell rm -rf system/app/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)
67 adb shell rm -rf data/run-test/test-*/dalvik-cache/*
69 ifneq ($(art_dont_bother),true)
71 ########################################################################
72 # cpplint rules to style check art source files
74 include $(art_path)/build/Android.cpplint.mk
76 ########################################################################
79 include $(art_path)/runtime/Android.mk
80 include $(art_path)/runtime/simulator/Android.mk
81 include $(art_path)/compiler/Android.mk
82 include $(art_path)/dexdump/Android.mk
83 include $(art_path)/dexlist/Android.mk
84 include $(art_path)/dex2oat/Android.mk
85 include $(art_path)/disassembler/Android.mk
86 include $(art_path)/oatdump/Android.mk
87 include $(art_path)/imgdiag/Android.mk
88 include $(art_path)/patchoat/Android.mk
89 include $(art_path)/profman/Android.mk
90 include $(art_path)/dalvikvm/Android.mk
91 include $(art_path)/tools/Android.mk
92 include $(art_path)/tools/ahat/Android.mk
93 include $(art_path)/tools/dexfuzz/Android.mk
94 include $(art_path)/tools/dmtracedump/Android.mk
95 include $(art_path)/sigchainlib/Android.mk
96 include $(art_path)/libart_fake/Android.mk
99 # ART_HOST_DEPENDENCIES depends on Android.executable.mk above for ART_HOST_EXECUTABLES
100 ART_HOST_DEPENDENCIES := \
101 $(ART_HOST_EXECUTABLES) \
102 $(ART_HOST_DEX_DEPENDENCIES) \
103 $(ART_HOST_SHARED_LIBRARY_DEPENDENCIES)
104 ART_TARGET_DEPENDENCIES := \
105 $(ART_TARGET_EXECUTABLES) \
106 $(ART_TARGET_DEX_DEPENDENCIES) \
107 $(ART_TARGET_SHARED_LIBRARY_DEPENDENCIES)
109 ########################################################################
112 ifeq ($(art_test_bother),true)
114 # All the dependencies that must be built ahead of sync-ing them onto the target device.
115 TEST_ART_TARGET_SYNC_DEPS :=
117 include $(art_path)/build/Android.common_test.mk
118 include $(art_path)/build/Android.gtest.mk
119 include $(art_path)/test/Android.run-test.mk
120 include $(art_path)/benchmark/Android.mk
122 TEST_ART_ADB_ROOT_AND_REMOUNT := \
124 adb wait-for-device remount && \
125 ((adb shell touch /system/testfile && \
126 (adb shell rm /system/testfile || true)) || \
127 (adb disable-verity && \
129 adb wait-for-device root && \
130 adb wait-for-device remount)))
132 # Sync test files to the target, depends upon all things that must be pushed to the target.
133 .PHONY: test-art-target-sync
134 # Check if we need to sync. In case ART_TEST_ANDROID_ROOT is not empty,
135 # the code below uses 'adb push' instead of 'adb sync', which does not
136 # check if the files on the device have changed.
137 ifneq ($(ART_TEST_NO_SYNC),true)
138 ifeq ($(ART_TEST_ANDROID_ROOT),)
139 test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
140 $(TEST_ART_ADB_ROOT_AND_REMOUNT)
143 test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
144 $(TEST_ART_ADB_ROOT_AND_REMOUNT)
145 adb wait-for-device push $(ANDROID_PRODUCT_OUT)/system $(ART_TEST_ANDROID_ROOT)
146 # Push the contents of the `data` dir into `/data` on the device. If
147 # `/data` already exists on the device, it is not overwritten, but its
148 # contents are updated.
149 adb push $(ANDROID_PRODUCT_OUT)/data /
153 # "mm test-art" to build and run all tests on host and device
155 test-art: test-art-host test-art-target
156 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
158 .PHONY: test-art-gtest
159 test-art-gtest: test-art-host-gtest test-art-target-gtest
160 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
162 .PHONY: test-art-run-test
163 test-art-run-test: test-art-host-run-test test-art-target-run-test
164 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
166 ########################################################################
169 VIXL_TEST_DEPENDENCY :=
170 # We can only run the vixl tests on 64-bit hosts (vixl testing issue) when its a
171 # top-level build (to declare the vixl test rule).
172 ifneq ($(HOST_PREFER_32_BIT),true)
173 ifeq ($(ONE_SHOT_MAKEFILE),)
174 VIXL_TEST_DEPENDENCY := run-vixl-tests
178 .PHONY: test-art-host-vixl
179 test-art-host-vixl: $(VIXL_TEST_DEPENDENCY)
181 # "mm test-art-host" to build and run all host tests.
182 .PHONY: test-art-host
183 test-art-host: test-art-host-gtest test-art-host-run-test \
184 test-art-host-vixl test-art-host-dexdump
185 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
187 # All host tests that run solely with the default compiler.
188 .PHONY: test-art-host-default
189 test-art-host-default: test-art-host-run-test-default
190 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
192 # All host tests that run solely with the optimizing compiler.
193 .PHONY: test-art-host-optimizing
194 test-art-host-optimizing: test-art-host-run-test-optimizing
195 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
197 # All host tests that run solely on the interpreter.
198 .PHONY: test-art-host-interpreter
199 test-art-host-interpreter: test-art-host-run-test-interpreter
200 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
202 # All host tests that run solely on the jit.
203 .PHONY: test-art-host-jit
204 test-art-host-jit: test-art-host-run-test-jit
205 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
207 # Primary host architecture variants:
208 .PHONY: test-art-host$(ART_PHONY_TEST_HOST_SUFFIX)
209 test-art-host$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(ART_PHONY_TEST_HOST_SUFFIX) \
210 test-art-host-run-test$(ART_PHONY_TEST_HOST_SUFFIX)
211 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
213 .PHONY: test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX)
214 test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(ART_PHONY_TEST_HOST_SUFFIX)
215 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
217 .PHONY: test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
218 test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
219 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
221 .PHONY: test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
222 test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
223 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
225 .PHONY: test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX)
226 test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(ART_PHONY_TEST_HOST_SUFFIX)
227 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
229 # Secondary host architecture variants:
230 ifneq ($(HOST_PREFER_32_BIT),true)
231 .PHONY: test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
232 test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(2ND_ART_PHONY_TEST_HOST_SUFFIX) \
233 test-art-host-run-test$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
234 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
236 .PHONY: test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
237 test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
238 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
240 .PHONY: test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
241 test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
242 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
244 .PHONY: test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
245 test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
246 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
248 .PHONY: test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
249 test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
250 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
253 # Dexdump/list regression test.
254 .PHONY: test-art-host-dexdump
255 test-art-host-dexdump: $(addprefix $(HOST_OUT_EXECUTABLES)/, dexdump2 dexlist)
256 ANDROID_HOST_OUT=$(realpath $(HOST_OUT)) art/test/dexdump/run-all-tests
259 .PHONY: valgrind-test-art-host
260 valgrind-test-art-host: valgrind-test-art-host-gtest
261 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
263 .PHONY: valgrind-test-art-host32
264 valgrind-test-art-host32: valgrind-test-art-host-gtest32
265 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
267 .PHONY: valgrind-test-art-host64
268 valgrind-test-art-host64: valgrind-test-art-host-gtest64
269 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
271 ########################################################################
274 # "mm test-art-target" to build and run all target tests.
275 .PHONY: test-art-target
276 test-art-target: test-art-target-gtest test-art-target-run-test
277 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
279 # All target tests that run solely with the default compiler.
280 .PHONY: test-art-target-default
281 test-art-target-default: test-art-target-run-test-default
282 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
284 # All target tests that run solely with the optimizing compiler.
285 .PHONY: test-art-target-optimizing
286 test-art-target-optimizing: test-art-target-run-test-optimizing
287 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
289 # All target tests that run solely on the interpreter.
290 .PHONY: test-art-target-interpreter
291 test-art-target-interpreter: test-art-target-run-test-interpreter
292 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
294 # All target tests that run solely on the jit.
295 .PHONY: test-art-target-jit
296 test-art-target-jit: test-art-target-run-test-jit
297 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
299 # Primary target architecture variants:
300 .PHONY: test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX)
301 test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(ART_PHONY_TEST_TARGET_SUFFIX) \
302 test-art-target-run-test$(ART_PHONY_TEST_TARGET_SUFFIX)
303 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
305 .PHONY: test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX)
306 test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(ART_PHONY_TEST_TARGET_SUFFIX)
307 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
309 .PHONY: test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
310 test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
311 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
313 .PHONY: test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
314 test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
315 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
317 .PHONY: test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX)
318 test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(ART_PHONY_TEST_TARGET_SUFFIX)
319 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
321 # Secondary target architecture variants:
322 ifdef TARGET_2ND_ARCH
323 .PHONY: test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
324 test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) \
325 test-art-target-run-test$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
326 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
328 .PHONY: test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
329 test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
330 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
332 .PHONY: test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
333 test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
334 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
336 .PHONY: test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
337 test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
338 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
340 .PHONY: test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
341 test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
342 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
345 endif # art_test_bother
348 .PHONY: valgrind-test-art-target
349 valgrind-test-art-target: valgrind-test-art-target-gtest
350 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
352 .PHONY: valgrind-test-art-target32
353 valgrind-test-art-target32: valgrind-test-art-target-gtest32
354 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
356 .PHONY: valgrind-test-art-target64
357 valgrind-test-art-target64: valgrind-test-art-target-gtest64
358 $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
360 ########################################################################
361 # oat-target and oat-target-sync rules
365 # $(1): input jar or apk target location
366 define declare-oat-target-target
367 OUT_OAT_FILE := $(PRODUCT_OUT)/$(basename $(1)).odex
369 ifeq ($(ONE_SHOT_MAKEFILE),)
370 # ONE_SHOT_MAKEFILE is empty for a top level build and we don't want
371 # to define the oat-target-* rules there because they will conflict
372 # with the build/core/dex_preopt.mk defined rules.
373 .PHONY: oat-target-$(1)
377 .PHONY: oat-target-$(1)
378 oat-target-$(1): $$(OUT_OAT_FILE)
380 $$(OUT_OAT_FILE): $(PRODUCT_OUT)/$(1) $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) $(DEX2OAT_DEPENDENCY)
381 @mkdir -p $$(dir $$@)
382 $(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \
383 --boot-image=$(DEFAULT_DEX_PREOPT_BUILT_IMAGE) --dex-file=$(PRODUCT_OUT)/$(1) \
384 --dex-location=/$(1) --oat-file=$$@ \
385 --instruction-set=$(DEX2OAT_TARGET_ARCH) \
386 --instruction-set-variant=$(DEX2OAT_TARGET_CPU_VARIANT) \
387 --instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
388 --android-root=$(PRODUCT_OUT)/system --include-patch-information \
389 --runtime-arg -Xnorelocate
393 OAT_TARGET_RULES += oat-target-$(1)
398 $(addprefix $(TARGET_OUT_JAVA_LIBRARIES)/,$(addsuffix .jar,$(LIBART_TARGET_BOOT_JARS))),\
399 $(wildcard $(TARGET_OUT_APPS)/*.apk) $(wildcard $(TARGET_OUT_JAVA_LIBRARIES)/*.jar)),\
400 $(eval $(call declare-oat-target-target,$(subst $(PRODUCT_OUT)/,,$(file)))))
403 oat-target: $(ART_TARGET_DEPENDENCIES) $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) $(OAT_TARGET_RULES)
405 .PHONY: oat-target-sync
406 oat-target-sync: oat-target
407 $(TEST_ART_ADB_ROOT_AND_REMOUNT)
410 ####################################################################################################
411 # Fake packages to ensure generation of libopenjdkd when one builds with mm/mmm/mmma.
413 # The library is required for starting a runtime in debug mode, but libartd does not depend on it
414 # (dependency cycle otherwise).
416 # Note: * As the package is phony to create a dependency the package name is irrelevant.
417 # * We make MULTILIB explicit to "both," just to state here that we want both libraries on
418 # 64-bit systems, even if it is the default.
421 ifeq ($(ART_BUILD_HOST_DEBUG),true)
422 include $(CLEAR_VARS)
423 LOCAL_MODULE := art-libartd-libopenjdkd-host-dependency
424 LOCAL_MULTILIB := both
425 LOCAL_REQUIRED_MODULES := libopenjdkd
426 LOCAL_IS_HOST_MODULE := true
427 include $(BUILD_PHONY_PACKAGE)
431 ifeq ($(ART_BUILD_TARGET_DEBUG),true)
432 include $(CLEAR_VARS)
433 LOCAL_MODULE := art-libartd-libopenjdkd-target-dependency
434 LOCAL_MULTILIB := both
435 LOCAL_REQUIRED_MODULES := libopenjdkd
436 include $(BUILD_PHONY_PACKAGE)
439 ########################################################################
440 # "m build-art" for quick minimal build
442 build-art: build-art-host build-art-target
444 .PHONY: build-art-host
445 build-art-host: $(HOST_OUT_EXECUTABLES)/art $(ART_HOST_DEPENDENCIES) $(HOST_CORE_IMG_OUTS)
447 .PHONY: build-art-target
448 build-art-target: $(TARGET_OUT_EXECUTABLES)/art $(ART_TARGET_DEPENDENCIES) $(TARGET_CORE_IMG_OUTS)
450 ########################################################################
451 # Rules for building all dependencies for tests.
453 .PHONY: build-art-host-tests
454 build-art-host-tests: build-art-host $(TEST_ART_RUN_TEST_DEPENDENCIES) $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(ART_TEST_HOST_GTEST_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
456 .PHONY: build-art-target-tests
457 build-art-target-tests: build-art-target $(TEST_ART_RUN_TEST_DEPENDENCIES) $(TEST_ART_TARGET_SYNC_DEPS) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
459 ########################################################################
460 # targets to switch back and forth from libdvm to libart
465 adb wait-for-device shell stop
466 adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
472 adb wait-for-device shell stop
473 adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
479 adb wait-for-device shell stop
480 adb shell setprop persist.sys.dalvik.vm.lib.2 libdvm.so
486 adb wait-for-device shell stop
487 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
488 adb shell setprop dalvik.vm.dex2oat-filter \"\"
489 adb shell setprop dalvik.vm.image-dex2oat-filter \"\"
490 adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
491 adb shell setprop dalvik.vm.usejit false
494 .PHONY: use-artd-full
497 adb wait-for-device shell stop
498 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
499 adb shell setprop dalvik.vm.dex2oat-filter \"\"
500 adb shell setprop dalvik.vm.image-dex2oat-filter \"\"
501 adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
502 adb shell setprop dalvik.vm.usejit false
508 adb wait-for-device shell stop
509 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
510 adb shell setprop dalvik.vm.dex2oat-filter "verify-at-runtime"
511 adb shell setprop dalvik.vm.image-dex2oat-filter "verify-at-runtime"
512 adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
513 adb shell setprop dalvik.vm.usejit true
516 .PHONY: use-art-interpret-only
517 use-art-interpret-only:
519 adb wait-for-device shell stop
520 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
521 adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
522 adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
523 adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
524 adb shell setprop dalvik.vm.usejit false
527 .PHONY: use-artd-interpret-only
528 use-artd-interpret-only:
530 adb wait-for-device shell stop
531 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
532 adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
533 adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
534 adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
535 adb shell setprop dalvik.vm.usejit false
538 .PHONY: use-art-verify-none
541 adb wait-for-device shell stop
542 adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
543 adb shell setprop dalvik.vm.dex2oat-filter "verify-none"
544 adb shell setprop dalvik.vm.image-dex2oat-filter "verify-none"
545 adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
546 adb shell setprop dalvik.vm.usejit false
549 ########################################################################
551 endif # !art_dont_bother
553 # Clear locally used variables.
556 TEST_ART_TARGET_SYNC_DEPS :=
558 include $(art_path)/runtime/openjdkjvm/Android.mk
560 # Helper target that depends on boot image creation.
562 # Can be used, for example, to dump initialization failures:
563 # m art-boot-image ART_BOOT_IMAGE_EXTRA_ARGS=--dump-init-failures=fails.txt
564 .PHONY: art-boot-image
565 art-boot-image: $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)