Home | History | Annotate | Download | only in art
      1 #
      2 # Copyright (C) 2011 The Android Open Source Project
      3 #
      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
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     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.
     15 #
     16 
     17 LOCAL_PATH := $(call my-dir)
     18 
     19 art_path := $(LOCAL_PATH)
     20 
     21 ########################################################################
     22 # clean-oat rules
     23 #
     24 
     25 include $(art_path)/build/Android.common_path.mk
     26 include $(art_path)/build/Android.oat.mk
     27 
     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
     32 endif
     33 
     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%,$(MAKECMDGOALS)))
     37   art_test_bother := true
     38 endif
     39 
     40 .PHONY: clean-oat
     41 clean-oat: clean-oat-host clean-oat-target
     42 
     43 .PHONY: clean-oat-host
     44 clean-oat-host:
     45 	find $(OUT_DIR) -name "*.oat" -o -name "*.odex" -o -name "*.art" | xargs rm -f
     46 ifneq ($(TMPDIR),)
     47 	rm -rf $(TMPDIR)/$(USER)/test-*/dalvik-cache/*
     48 	rm -rf $(TMPDIR)/android-data/dalvik-cache/*
     49 else
     50 	rm -rf /tmp/$(USER)/test-*/dalvik-cache/*
     51 	rm -rf /tmp/android-data/dalvik-cache/*
     52 endif
     53 
     54 .PHONY: clean-oat-target
     55 clean-oat-target:
     56 	adb root
     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)
     63 ifdef TARGET_2ND_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)
     66 endif
     67 	adb shell rm -rf data/run-test/test-*/dalvik-cache/*
     68 
     69 ifneq ($(art_dont_bother),true)
     70 
     71 ########################################################################
     72 # cpplint rules to style check art source files
     73 
     74 include $(art_path)/build/Android.cpplint.mk
     75 
     76 ########################################################################
     77 # product rules
     78 
     79 include $(art_path)/runtime/Android.mk
     80 include $(art_path)/compiler/Android.mk
     81 include $(art_path)/dex2oat/Android.mk
     82 include $(art_path)/disassembler/Android.mk
     83 include $(art_path)/oatdump/Android.mk
     84 include $(art_path)/imgdiag/Android.mk
     85 include $(art_path)/patchoat/Android.mk
     86 include $(art_path)/dalvikvm/Android.mk
     87 include $(art_path)/tools/Android.mk
     88 include $(art_path)/tools/dexfuzz/Android.mk
     89 include $(art_path)/sigchainlib/Android.mk
     90 
     91 
     92 # ART_HOST_DEPENDENCIES depends on Android.executable.mk above for ART_HOST_EXECUTABLES
     93 ART_HOST_DEPENDENCIES := \
     94 	$(ART_HOST_EXECUTABLES) \
     95 	$(HOST_OUT_JAVA_LIBRARIES)/core-libart-hostdex.jar \
     96 	$(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
     97 ART_TARGET_DEPENDENCIES := \
     98 	$(ART_TARGET_EXECUTABLES) \
     99 	$(TARGET_OUT_JAVA_LIBRARIES)/core-libart.jar \
    100 	$(TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so
    101 ifdef TARGET_2ND_ARCH
    102 ART_TARGET_DEPENDENCIES += $(2ND_TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so
    103 endif
    104 ifdef HOST_2ND_ARCH
    105 ART_HOST_DEPENDENCIES += $(2ND_HOST_OUT_SHARED_LIBRARIES)/libjavacore.so
    106 endif
    107 
    108 ########################################################################
    109 # test rules
    110 
    111 ifeq ($(art_test_bother),true)
    112 
    113 # All the dependencies that must be built ahead of sync-ing them onto the target device.
    114 TEST_ART_TARGET_SYNC_DEPS :=
    115 
    116 include $(art_path)/build/Android.common_test.mk
    117 include $(art_path)/build/Android.gtest.mk
    118 include $(art_path)/test/Android.run-test.mk
    119 
    120 # Sync test files to the target, depends upon all things that must be pushed to the target.
    121 .PHONY: test-art-target-sync
    122 ifeq ($(ART_TEST_ANDROID_ROOT),)
    123 test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
    124 	adb root
    125 	adb wait-for-device remount
    126 	adb sync
    127 else
    128 test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
    129 	adb root
    130 	adb wait-for-device push $(ANDROID_PRODUCT_OUT)/system $(ART_TEST_ANDROID_ROOT)
    131 	adb push $(ANDROID_PRODUCT_OUT)/data /data
    132 endif
    133 
    134 # Undefine variable now its served its purpose.
    135 TEST_ART_TARGET_SYNC_DEPS :=
    136 
    137 # "mm test-art" to build and run all tests on host and device
    138 .PHONY: test-art
    139 test-art: test-art-host test-art-target
    140 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    141 
    142 .PHONY: test-art-gtest
    143 test-art-gtest: test-art-host-gtest test-art-target-gtest
    144 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    145 
    146 .PHONY: test-art-run-test
    147 test-art-run-test: test-art-host-run-test test-art-target-run-test
    148 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    149 
    150 ########################################################################
    151 # host test rules
    152 
    153 VIXL_TEST_DEPENDENCY :=
    154 # We can only run the vixl tests on 64-bit hosts (vixl testing issue) when its a
    155 # top-level build (to declare the vixl test rule).
    156 ifneq ($(HOST_PREFER_32_BIT),true)
    157 ifeq ($(ONE_SHOT_MAKEFILE),)
    158 VIXL_TEST_DEPENDENCY := run-vixl-tests
    159 endif
    160 endif
    161 
    162 .PHONY: test-art-host-vixl
    163 test-art-host-vixl: $(VIXL_TEST_DEPENDENCY)
    164 
    165 # "mm test-art-host" to build and run all host tests.
    166 .PHONY: test-art-host
    167 test-art-host: test-art-host-gtest test-art-host-run-test test-art-host-vixl
    168 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    169 
    170 # All host tests that run solely with the default compiler.
    171 .PHONY: test-art-host-default
    172 test-art-host-default: test-art-host-run-test-default
    173 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    174 
    175 # All host tests that run solely with the optimizing compiler.
    176 .PHONY: test-art-host-optimizing
    177 test-art-host-optimizing: test-art-host-run-test-optimizing
    178 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    179 
    180 # All host tests that run solely on the interpreter.
    181 .PHONY: test-art-host-interpreter
    182 test-art-host-interpreter: test-art-host-run-test-interpreter
    183 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    184 
    185 # All host tests that run solely on the jit.
    186 .PHONY: test-art-host-jit
    187 test-art-host-jit: test-art-host-run-test-jit
    188 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    189 
    190 # Primary host architecture variants:
    191 .PHONY: test-art-host$(ART_PHONY_TEST_HOST_SUFFIX)
    192 test-art-host$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(ART_PHONY_TEST_HOST_SUFFIX) \
    193     test-art-host-run-test$(ART_PHONY_TEST_HOST_SUFFIX)
    194 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    195 
    196 .PHONY: test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX)
    197 test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(ART_PHONY_TEST_HOST_SUFFIX)
    198 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    199 
    200 .PHONY: test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
    201 test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
    202 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    203 
    204 .PHONY: test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
    205 test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
    206 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    207 
    208 .PHONY: test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX)
    209 test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(ART_PHONY_TEST_HOST_SUFFIX)
    210 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    211 
    212 # Secondary host architecture variants:
    213 ifneq ($(HOST_PREFER_32_BIT),true)
    214 .PHONY: test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    215 test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(2ND_ART_PHONY_TEST_HOST_SUFFIX) \
    216     test-art-host-run-test$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    217 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    218 
    219 .PHONY: test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    220 test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    221 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    222 
    223 .PHONY: test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    224 test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    225 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    226 
    227 .PHONY: test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    228 test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    229 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    230 
    231 .PHONY: test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    232 test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
    233 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    234 endif
    235 
    236 # Valgrind. Currently only 32b gtests.
    237 .PHONY: valgrind-test-art-host
    238 valgrind-test-art-host: valgrind-test-art-host-gtest32
    239 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    240 
    241 ########################################################################
    242 # target test rules
    243 
    244 # "mm test-art-target" to build and run all target tests.
    245 .PHONY: test-art-target
    246 test-art-target: test-art-target-gtest test-art-target-run-test
    247 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    248 
    249 # All target tests that run solely with the default compiler.
    250 .PHONY: test-art-target-default
    251 test-art-target-default: test-art-target-run-test-default
    252 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    253 
    254 # All target tests that run solely with the optimizing compiler.
    255 .PHONY: test-art-target-optimizing
    256 test-art-target-optimizing: test-art-target-run-test-optimizing
    257 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    258 
    259 # All target tests that run solely on the interpreter.
    260 .PHONY: test-art-target-interpreter
    261 test-art-target-interpreter: test-art-target-run-test-interpreter
    262 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    263 
    264 # All target tests that run solely on the jit.
    265 .PHONY: test-art-target-jit
    266 test-art-target-jit: test-art-target-run-test-jit
    267 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    268 
    269 # Primary target architecture variants:
    270 .PHONY: test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX)
    271 test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(ART_PHONY_TEST_TARGET_SUFFIX) \
    272     test-art-target-run-test$(ART_PHONY_TEST_TARGET_SUFFIX)
    273 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    274 
    275 .PHONY: test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX)
    276 test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(ART_PHONY_TEST_TARGET_SUFFIX)
    277 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    278 
    279 .PHONY: test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
    280 test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
    281 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    282 
    283 .PHONY: test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
    284 test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
    285 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    286 
    287 .PHONY: test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX)
    288 test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(ART_PHONY_TEST_TARGET_SUFFIX)
    289 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    290 
    291 # Secondary target architecture variants:
    292 ifdef TARGET_2ND_ARCH
    293 .PHONY: test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    294 test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) \
    295     test-art-target-run-test$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    296 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    297 
    298 .PHONY: test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    299 test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    300 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    301 
    302 .PHONY: test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    303 test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    304 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    305 
    306 .PHONY: test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    307 test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    308 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    309 
    310 .PHONY: test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    311 test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    312 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    313 endif
    314 
    315 endif  # art_test_bother
    316 
    317 ########################################################################
    318 # oat-target and oat-target-sync rules
    319 
    320 OAT_TARGET_RULES :=
    321 
    322 # $(1): input jar or apk target location
    323 define declare-oat-target-target
    324 OUT_OAT_FILE := $(PRODUCT_OUT)/$(basename $(1)).odex
    325 
    326 ifeq ($(ONE_SHOT_MAKEFILE),)
    327 # ONE_SHOT_MAKEFILE is empty for a top level build and we don't want
    328 # to define the oat-target-* rules there because they will conflict
    329 # with the build/core/dex_preopt.mk defined rules.
    330 .PHONY: oat-target-$(1)
    331 oat-target-$(1):
    332 
    333 else
    334 .PHONY: oat-target-$(1)
    335 oat-target-$(1): $$(OUT_OAT_FILE)
    336 
    337 $$(OUT_OAT_FILE): $(PRODUCT_OUT)/$(1) $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) $(DEX2OAT_DEPENDENCY)
    338 	@mkdir -p $$(dir $$@)
    339 	$(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \
    340 		--boot-image=$(DEFAULT_DEX_PREOPT_BUILT_IMAGE) --dex-file=$(PRODUCT_OUT)/$(1) \
    341 		--dex-location=/$(1) --oat-file=$$@ \
    342 		--instruction-set=$(DEX2OAT_TARGET_ARCH) \
    343 		--instruction-set-variant=$(DEX2OAT_TARGET_CPU_VARIANT) \
    344 		--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
    345 		--android-root=$(PRODUCT_OUT)/system --include-patch-information \
    346 		--runtime-arg -Xnorelocate
    347 
    348 endif
    349 
    350 OAT_TARGET_RULES += oat-target-$(1)
    351 endef
    352 
    353 $(foreach file,\
    354   $(filter-out\
    355     $(addprefix $(TARGET_OUT_JAVA_LIBRARIES)/,$(addsuffix .jar,$(LIBART_TARGET_BOOT_JARS))),\
    356     $(wildcard $(TARGET_OUT_APPS)/*.apk) $(wildcard $(TARGET_OUT_JAVA_LIBRARIES)/*.jar)),\
    357   $(eval $(call declare-oat-target-target,$(subst $(PRODUCT_OUT)/,,$(file)))))
    358 
    359 .PHONY: oat-target
    360 oat-target: $(ART_TARGET_DEPENDENCIES) $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) $(OAT_TARGET_RULES)
    361 
    362 .PHONY: oat-target-sync
    363 oat-target-sync: oat-target
    364 	adb root
    365 	adb wait-for-device remount
    366 	adb sync
    367 
    368 ########################################################################
    369 # "m build-art" for quick minimal build
    370 .PHONY: build-art
    371 build-art: build-art-host build-art-target
    372 
    373 .PHONY: build-art-host
    374 build-art-host:   $(HOST_OUT_EXECUTABLES)/art $(ART_HOST_DEPENDENCIES) $(HOST_CORE_IMG_OUTS)
    375 
    376 .PHONY: build-art-target
    377 build-art-target: $(TARGET_OUT_EXECUTABLES)/art $(ART_TARGET_DEPENDENCIES) $(TARGET_CORE_IMG_OUTS)
    378 
    379 ########################################################################
    380 # targets to switch back and forth from libdvm to libart
    381 
    382 .PHONY: use-art
    383 use-art:
    384 	adb root
    385 	adb wait-for-device shell stop
    386 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    387 	adb shell start
    388 
    389 .PHONY: use-artd
    390 use-artd:
    391 	adb root
    392 	adb wait-for-device shell stop
    393 	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
    394 	adb shell start
    395 
    396 .PHONY: use-dalvik
    397 use-dalvik:
    398 	adb root
    399 	adb wait-for-device shell stop
    400 	adb shell setprop persist.sys.dalvik.vm.lib.2 libdvm.so
    401 	adb shell start
    402 
    403 .PHONY: use-art-full
    404 use-art-full:
    405 	adb root
    406 	adb wait-for-device shell stop
    407 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    408 	adb shell setprop dalvik.vm.dex2oat-filter \"\"
    409 	adb shell setprop dalvik.vm.image-dex2oat-filter \"\"
    410 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    411 	adb shell start
    412 
    413 .PHONY: use-artd-full
    414 use-artd-full:
    415 	adb root
    416 	adb wait-for-device shell stop
    417 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    418 	adb shell setprop dalvik.vm.dex2oat-filter \"\"
    419 	adb shell setprop dalvik.vm.image-dex2oat-filter \"\"
    420 	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
    421 	adb shell start
    422 
    423 .PHONY: use-art-verify-at-runtime
    424 use-art-verify-at-runtime:
    425 	adb root
    426 	adb wait-for-device shell stop
    427 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    428 	adb shell setprop dalvik.vm.dex2oat-filter "verify-at-runtime"
    429 	adb shell setprop dalvik.vm.image-dex2oat-filter "verify-at-runtime"
    430 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    431 	adb shell start
    432 
    433 .PHONY: use-art-interpret-only
    434 use-art-interpret-only:
    435 	adb root
    436 	adb wait-for-device shell stop
    437 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    438 	adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
    439 	adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
    440 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    441 	adb shell start
    442 
    443 .PHONY: use-artd-interpret-only
    444 use-artd-interpret-only:
    445 	adb root
    446 	adb wait-for-device shell stop
    447 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    448 	adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
    449 	adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
    450 	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
    451 	adb shell start
    452 
    453 .PHONY: use-art-verify-none
    454 use-art-verify-none:
    455 	adb root
    456 	adb wait-for-device shell stop
    457 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    458 	adb shell setprop dalvik.vm.dex2oat-filter "verify-none"
    459 	adb shell setprop dalvik.vm.image-dex2oat-filter "verify-none"
    460 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    461 	adb shell start
    462 
    463 ########################################################################
    464 
    465 endif # !art_dont_bother
    466 
    467 # Clear locally used variables.
    468 art_dont_bother :=
    469 art_test_bother :=
    470