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 
     27 # following the example of build's dont_bother for clean targets
     28 ifneq (,$(filter clean-oat,$(MAKECMDGOALS)))
     29 art_dont_bother := true
     30 endif
     31 ifneq (,$(filter clean-oat-host,$(MAKECMDGOALS)))
     32 art_dont_bother := true
     33 endif
     34 ifneq (,$(filter clean-oat-target,$(MAKECMDGOALS)))
     35 art_dont_bother := true
     36 endif
     37 
     38 .PHONY: clean-oat
     39 clean-oat: clean-oat-host clean-oat-target
     40 
     41 .PHONY: clean-oat-host
     42 clean-oat-host:
     43 	rm -f $(HOST_CORE_IMG_OUT)
     44 	rm -f $(HOST_CORE_OAT_OUT)
     45 	rm -f $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/*.odex
     46 ifneq ($(HOST_PREFER_32_BIT),true)
     47 	rm -f $(2ND_HOST_CORE_IMG_OUT)
     48 	rm -f $(2ND_HOST_CORE_OAT_OUT)
     49 	rm -f $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/*.odex
     50 endif
     51 	rm -f $(TARGET_CORE_IMG_OUT)
     52 	rm -f $(TARGET_CORE_OAT_OUT)
     53 ifdef TARGET_2ND_ARCH
     54 	rm -f $(2ND_TARGET_CORE_IMG_OUT)
     55 	rm -f $(2ND_TARGET_CORE_OAT_OUT)
     56 endif
     57 	rm -rf $(DEXPREOPT_PRODUCT_DIR_FULL_PATH)
     58 	rm -f $(TARGET_OUT_UNSTRIPPED)/system/framework/*.odex
     59 	rm -f $(TARGET_OUT_UNSTRIPPED)/system/framework/*/*.oat
     60 	rm -f $(TARGET_OUT_UNSTRIPPED)/system/framework/*/*.art
     61 	rm -f $(TARGET_OUT)/framework/*/*.oat
     62 	rm -f $(TARGET_OUT)/framework/*/*.art
     63 	rm -f $(TARGET_OUT_APPS)/*.odex
     64 	rm -f $(TARGET_OUT_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/javalib.odex
     65 	rm -f $(TARGET_OUT_INTERMEDIATES)/APPS/*_intermediates/*.odex
     66 ifdef TARGET_2ND_ARCH
     67 	rm -f $(2ND_TARGET_OUT_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/javalib.odex
     68 	rm -f $(2ND_TARGET_OUT_INTERMEDIATES)/APPS/*_intermediates/*.odex
     69 endif
     70 ifneq ($(TMPDIR),)
     71 	rm -rf $(TMPDIR)/$(USER)/test-*/dalvik-cache/*
     72 	rm -rf $(TMPDIR)/android-data/dalvik-cache/*
     73 else
     74 	rm -rf /tmp/$(USER)/test-*/dalvik-cache/*
     75 	rm -rf /tmp/android-data/dalvik-cache/*
     76 endif
     77 
     78 .PHONY: clean-oat-target
     79 clean-oat-target:
     80 	adb remount
     81 	adb shell rm -rf $(ART_TARGET_NATIVETEST_DIR)
     82 	adb shell rm -rf $(ART_TARGET_TEST_DIR)
     83 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*/*
     84 	adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$(DEX2OAT_TARGET_ARCH)
     85 	adb shell rm -rf system/app/$(DEX2OAT_TARGET_ARCH)
     86 ifdef TARGET_2ND_ARCH
     87 	adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)
     88 	adb shell rm -rf system/app/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)
     89 endif
     90 	adb shell rm -rf data/run-test/test-*/dalvik-cache/*
     91 
     92 ifneq ($(art_dont_bother),true)
     93 
     94 ########################################################################
     95 # cpplint rules to style check art source files
     96 
     97 include $(art_path)/build/Android.cpplint.mk
     98 
     99 ########################################################################
    100 # product rules
    101 
    102 include $(art_path)/runtime/Android.mk
    103 include $(art_path)/compiler/Android.mk
    104 include $(art_path)/dex2oat/Android.mk
    105 include $(art_path)/disassembler/Android.mk
    106 include $(art_path)/oatdump/Android.mk
    107 include $(art_path)/patchoat/Android.mk
    108 include $(art_path)/dalvikvm/Android.mk
    109 include $(art_path)/tools/Android.mk
    110 include $(art_path)/build/Android.oat.mk
    111 include $(art_path)/sigchainlib/Android.mk
    112 
    113 
    114 # ART_HOST_DEPENDENCIES depends on Android.executable.mk above for ART_HOST_EXECUTABLES
    115 ART_HOST_DEPENDENCIES := \
    116 	$(ART_HOST_EXECUTABLES) \
    117 	$(HOST_OUT_JAVA_LIBRARIES)/core-libart-hostdex.jar \
    118 	$(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
    119 ART_TARGET_DEPENDENCIES := \
    120 	$(ART_TARGET_EXECUTABLES) \
    121 	$(TARGET_OUT_JAVA_LIBRARIES)/core-libart.jar \
    122 	$(TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so
    123 ifdef TARGET_2ND_ARCH
    124 ART_TARGET_DEPENDENCIES += $(2ND_TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so
    125 endif
    126 
    127 ########################################################################
    128 # test rules
    129 
    130 # All the dependencies that must be built ahead of sync-ing them onto the target device.
    131 TEST_ART_TARGET_SYNC_DEPS :=
    132 
    133 include $(art_path)/build/Android.common_test.mk
    134 include $(art_path)/build/Android.gtest.mk
    135 include $(art_path)/test/Android.run-test.mk
    136 
    137 # Sync test files to the target, depends upon all things that must be pushed to the target.
    138 .PHONY: test-art-target-sync
    139 test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
    140 	adb remount
    141 	adb sync
    142 
    143 # Undefine variable now its served its purpose.
    144 TEST_ART_TARGET_SYNC_DEPS :=
    145 
    146 # "mm test-art" to build and run all tests on host and device
    147 .PHONY: test-art
    148 test-art: test-art-host test-art-target
    149 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    150 
    151 .PHONY: test-art-gtest
    152 test-art-gtest: test-art-host-gtest test-art-target-gtest
    153 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    154 
    155 .PHONY: test-art-run-test
    156 test-art-run-test: test-art-host-run-test test-art-target-run-test
    157 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    158 
    159 ########################################################################
    160 # host test rules
    161 
    162 VIXL_TEST_DEPENDENCY :=
    163 # We can only run the vixl tests on 64-bit hosts (vixl testing issue) when its a
    164 # top-level build (to declare the vixl test rule).
    165 ifneq ($(HOST_PREFER_32_BIT),true)
    166 ifeq ($(ONE_SHOT_MAKEFILE),)
    167 VIXL_TEST_DEPENDENCY := run-vixl-tests
    168 endif
    169 endif
    170 
    171 .PHONY: test-art-host-vixl
    172 test-art-host-vixl: $(VIXL_TEST_DEPENDENCY)
    173 
    174 # "mm test-art-host" to build and run all host tests.
    175 .PHONY: test-art-host
    176 test-art-host: test-art-host-gtest test-art-host-run-test test-art-host-vixl
    177 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    178 
    179 # All host tests that run solely with the default compiler.
    180 .PHONY: test-art-host-default
    181 test-art-host-default: test-art-host-run-test-default
    182 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    183 
    184 # All host tests that run solely with the optimizing compiler.
    185 .PHONY: test-art-host-optimizing
    186 test-art-host-optimizing: test-art-host-run-test-optimizing
    187 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    188 
    189 # All host tests that run solely on the interpreter.
    190 .PHONY: test-art-host-interpreter
    191 test-art-host-interpreter: test-art-host-run-test-interpreter
    192 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    193 
    194 # Primary host architecture variants:
    195 .PHONY: test-art-host$(ART_PHONY_TEST_HOST_SUFFIX)
    196 test-art-host$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(ART_PHONY_TEST_HOST_SUFFIX) \
    197     test-art-host-run-test$(ART_PHONY_TEST_HOST_SUFFIX)
    198 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    199 
    200 .PHONY: test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX)
    201 test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(ART_PHONY_TEST_HOST_SUFFIX)
    202 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    203 
    204 .PHONY: test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
    205 test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
    206 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    207 
    208 .PHONY: test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
    209 test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(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 endif
    231 
    232 ########################################################################
    233 # target test rules
    234 
    235 # "mm test-art-target" to build and run all target tests.
    236 .PHONY: test-art-target
    237 test-art-target: test-art-target-gtest test-art-target-run-test
    238 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    239 
    240 # All target tests that run solely with the default compiler.
    241 .PHONY: test-art-target-default
    242 test-art-target-default: test-art-target-run-test-default
    243 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    244 
    245 # All target tests that run solely with the optimizing compiler.
    246 .PHONY: test-art-target-optimizing
    247 test-art-target-optimizing: test-art-target-run-test-optimizing
    248 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    249 
    250 # All target tests that run solely on the interpreter.
    251 .PHONY: test-art-target-interpreter
    252 test-art-target-interpreter: test-art-target-run-test-interpreter
    253 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    254 
    255 # Primary target architecture variants:
    256 .PHONY: test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX)
    257 test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(ART_PHONY_TEST_TARGET_SUFFIX) \
    258     test-art-target-run-test$(ART_PHONY_TEST_TARGET_SUFFIX)
    259 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    260 
    261 .PHONY: test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX)
    262 test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(ART_PHONY_TEST_TARGET_SUFFIX)
    263 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    264 
    265 .PHONY: test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
    266 test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
    267 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    268 
    269 .PHONY: test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
    270 test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
    271 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    272 
    273 # Secondary target architecture variants:
    274 ifdef TARGET_2ND_ARCH
    275 .PHONY: test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    276 test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) \
    277     test-art-target-run-test$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    278 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    279 
    280 .PHONY: test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    281 test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    282 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    283 
    284 .PHONY: test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    285 test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    286 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    287 
    288 .PHONY: test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    289 test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
    290 	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
    291 endif
    292 
    293 ########################################################################
    294 # oat-target and oat-target-sync rules
    295 
    296 OAT_TARGET_RULES :=
    297 
    298 # $(1): input jar or apk target location
    299 define declare-oat-target-target
    300 ifneq (,$(filter $(1),$(addprefix system/app/,$(addsuffix .apk,$(PRODUCT_DEX_PREOPT_PACKAGES_IN_DATA)))))
    301 OUT_OAT_FILE := $(call dalvik-cache-out,$(1)/classes.dex)
    302 else
    303 OUT_OAT_FILE := $(PRODUCT_OUT)/$(basename $(1)).odex
    304 endif
    305 
    306 ifeq ($(ONE_SHOT_MAKEFILE),)
    307 # ONE_SHOT_MAKEFILE is empty for a top level build and we don't want
    308 # to define the oat-target-* rules there because they will conflict
    309 # with the build/core/dex_preopt.mk defined rules.
    310 .PHONY: oat-target-$(1)
    311 oat-target-$(1):
    312 
    313 else
    314 .PHONY: oat-target-$(1)
    315 oat-target-$(1): $$(OUT_OAT_FILE)
    316 
    317 $$(OUT_OAT_FILE): $(PRODUCT_OUT)/$(1) $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) $(DEX2OATD_DEPENDENCY)
    318 	@mkdir -p $$(dir $$@)
    319 	$(DEX2OATD) --runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \
    320 		--boot-image=$(DEFAULT_DEX_PREOPT_BUILT_IMAGE) --dex-file=$(PRODUCT_OUT)/$(1) \
    321 		--dex-location=/$(1) --oat-file=$$@ \
    322 		--instruction-set=$(DEX2OAT_TARGET_ARCH) \
    323 		--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
    324 		--android-root=$(PRODUCT_OUT)/system --include-patch-information \
    325 		--runtime-arg -Xnorelocate
    326 
    327 endif
    328 
    329 OAT_TARGET_RULES += oat-target-$(1)
    330 endef
    331 
    332 $(foreach file,\
    333   $(filter-out\
    334     $(addprefix $(TARGET_OUT_JAVA_LIBRARIES)/,$(addsuffix .jar,$(LIBART_TARGET_BOOT_JARS))),\
    335     $(wildcard $(TARGET_OUT_APPS)/*.apk) $(wildcard $(TARGET_OUT_JAVA_LIBRARIES)/*.jar)),\
    336   $(eval $(call declare-oat-target-target,$(subst $(PRODUCT_OUT)/,,$(file)))))
    337 
    338 .PHONY: oat-target
    339 oat-target: $(ART_TARGET_DEPENDENCIES) $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) $(OAT_TARGET_RULES)
    340 
    341 .PHONY: oat-target-sync
    342 oat-target-sync: oat-target
    343 	adb remount
    344 	adb sync
    345 
    346 ########################################################################
    347 # "m build-art" for quick minimal build
    348 .PHONY: build-art
    349 build-art: build-art-host build-art-target
    350 
    351 .PHONY: build-art-host
    352 build-art-host:   $(ART_HOST_EXECUTABLES)   $(ART_HOST_GTEST_EXECUTABLES)   $(HOST_CORE_IMG_OUT)   $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
    353 
    354 .PHONY: build-art-target
    355 build-art-target: $(ART_TARGET_EXECUTABLES) $(ART_TARGET_GTEST_EXECUTABLES) $(TARGET_CORE_IMG_OUT) $(TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so
    356 
    357 ########################################################################
    358 # "m art-host" for just building the files needed to run the art script
    359 .PHONY: art-host
    360 ifeq ($(HOST_PREFER_32_BIT),true)
    361 art-host:   $(HOST_OUT_EXECUTABLES)/art $(HOST_OUT)/bin/dalvikvm32 $(HOST_OUT)/lib/libart.so $(HOST_OUT)/bin/dex2oat $(HOST_OUT)/bin/patchoat $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so $(HOST_OUT)/bin/dalvikvm
    362 else
    363 art-host:   $(HOST_OUT_EXECUTABLES)/art $(HOST_OUT)/bin/dalvikvm64 $(HOST_OUT)/bin/dalvikvm32 $(HOST_OUT)/lib/libart.so $(HOST_OUT)/bin/dex2oat $(HOST_OUT)/bin/patchoat $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so $(HOST_OUT)/lib64/libjavacore.so $(HOST_OUT)/bin/dalvikvm
    364 endif
    365 
    366 .PHONY: art-host-debug
    367 art-host-debug:   art-host $(HOST_OUT)/lib/libartd.so $(HOST_OUT)/bin/dex2oatd $(HOST_OUT)/bin/patchoatd
    368 
    369 ########################################################################
    370 # targets to switch back and forth from libdvm to libart
    371 
    372 .PHONY: use-art
    373 use-art:
    374 	adb root && sleep 3
    375 	adb shell stop
    376 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    377 	adb shell start
    378 
    379 .PHONY: use-artd
    380 use-artd:
    381 	adb root && sleep 3
    382 	adb shell stop
    383 	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
    384 	adb shell start
    385 
    386 .PHONY: use-dalvik
    387 use-dalvik:
    388 	adb root && sleep 3
    389 	adb shell stop
    390 	adb shell setprop persist.sys.dalvik.vm.lib.2 libdvm.so
    391 	adb shell start
    392 
    393 .PHONY: use-art-full
    394 use-art-full:
    395 	adb root && sleep 3
    396 	adb shell stop
    397 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    398 	adb shell setprop dalvik.vm.dex2oat-filter ""
    399 	adb shell setprop dalvik.vm.image-dex2oat-filter ""
    400 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    401 	adb shell start
    402 
    403 .PHONY: use-artd-full
    404 use-artd-full:
    405 	adb root && sleep 3
    406 	adb 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 libartd.so
    411 	adb shell start
    412 
    413 .PHONY: use-art-smart
    414 use-art-smart:
    415 	adb root && sleep 3
    416 	adb shell stop
    417 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    418 	adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
    419 	adb shell setprop dalvik.vm.image-dex2oat-filter ""
    420 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    421 	adb shell start
    422 
    423 .PHONY: use-art-interpret-only
    424 use-art-interpret-only:
    425 	adb root && sleep 3
    426 	adb shell stop
    427 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    428 	adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
    429 	adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
    430 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    431 	adb shell start
    432 
    433 .PHONY: use-artd-interpret-only
    434 use-artd-interpret-only:
    435 	adb root && sleep 3
    436 	adb 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 libartd.so
    441 	adb shell start
    442 
    443 .PHONY: use-art-verify-none
    444 use-art-verify-none:
    445 	adb root && sleep 3
    446 	adb shell stop
    447 	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
    448 	adb shell setprop dalvik.vm.dex2oat-filter "verify-none"
    449 	adb shell setprop dalvik.vm.image-dex2oat-filter "verify-none"
    450 	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
    451 	adb shell start
    452 
    453 ########################################################################
    454 
    455 endif # !art_dont_bother
    456