Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 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) |
Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 18 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 19 | art_path := $(LOCAL_PATH) |
| 20 | art_build_path := $(art_path)/build |
Brian Carlstrom | 1f8730b | 2013-11-13 17:36:23 -0800 | [diff] [blame] | 21 | include $(art_build_path)/Android.common.mk |
Brian Carlstrom | cdc8de4 | 2011-07-19 14:23:17 -0700 | [diff] [blame] | 22 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 23 | ######################################################################## |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 24 | # clean-oat targets |
| 25 | # |
| 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: |
Brian Carlstrom | f662e06 | 2014-05-19 16:09:42 -0700 | [diff] [blame] | 43 | rm -rf $(ART_NATIVETEST_OUT) |
| 44 | rm -rf $(ART_TEST_OUT) |
| 45 | rm -f $(HOST_CORE_IMG_OUT) |
| 46 | rm -f $(HOST_CORE_OAT_OUT) |
| 47 | rm -f $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/*.odex |
| 48 | rm -f $(TARGET_CORE_IMG_OUT) |
| 49 | rm -f $(TARGET_CORE_OAT_OUT) |
| 50 | ifdef TARGET_2ND_ARCH |
| 51 | rm -f $(2ND_TARGET_CORE_IMG_OUT) |
| 52 | rm -f $(2ND_TARGET_CORE_OAT_OUT) |
| 53 | endif |
| 54 | rm -rf $(DEXPREOPT_PRODUCT_DIR_FULL_PATH) |
Brian Carlstrom | 999cd43 | 2013-06-22 23:08:53 -0700 | [diff] [blame] | 55 | rm -f $(TARGET_OUT_UNSTRIPPED)/system/framework/*.odex |
Brian Carlstrom | 1d6848c | 2013-03-06 15:03:52 -0800 | [diff] [blame] | 56 | rm -f $(TARGET_OUT_UNSTRIPPED)/system/framework/*.oat |
Brian Carlstrom | 999cd43 | 2013-06-22 23:08:53 -0700 | [diff] [blame] | 57 | rm -f $(TARGET_OUT_APPS)/*.odex |
Brian Carlstrom | 30e2ea4 | 2013-06-19 23:25:37 -0700 | [diff] [blame] | 58 | rm -f $(TARGET_OUT_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/javalib.odex |
| 59 | rm -f $(TARGET_OUT_INTERMEDIATES)/APPS/*_intermediates/*.odex |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 60 | ifdef TARGET_2ND_ARCH |
| 61 | rm -f $(2ND_TARGET_OUT_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/javalib.odex |
| 62 | rm -f $(2ND_TARGET_OUT_INTERMEDIATES)/APPS/*_intermediates/*.odex |
| 63 | endif |
Dmitry Petrochenko | 81c56e7 | 2014-03-05 15:05:46 +0700 | [diff] [blame] | 64 | rm -rf /tmp/$(USER)/test-*/dalvik-cache/* |
Brian Carlstrom | ae08961 | 2014-05-01 13:52:23 -0700 | [diff] [blame] | 65 | rm -rf /tmp/android-data/dalvik-cache/* |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 66 | |
| 67 | .PHONY: clean-oat-target |
| 68 | clean-oat-target: |
| 69 | adb remount |
Brian Carlstrom | f662e06 | 2014-05-19 16:09:42 -0700 | [diff] [blame] | 70 | adb shell rm -rf $(ART_NATIVETEST_DIR) |
| 71 | adb shell rm -rf $(ART_TEST_DIR) |
Brian Carlstrom | ae08961 | 2014-05-01 13:52:23 -0700 | [diff] [blame] | 72 | adb shell rm -rf $(ART_DALVIK_CACHE_DIR)/* |
Brian Carlstrom | f662e06 | 2014-05-19 16:09:42 -0700 | [diff] [blame] | 73 | adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$(DEX2OAT_TARGET_ARCH) |
| 74 | adb shell rm -rf system/app/$(DEX2OAT_TARGET_ARCH) |
| 75 | ifdef TARGET_2ND_ARCH |
| 76 | adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) |
| 77 | adb shell rm -rf system/app/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) |
| 78 | endif |
Brian Carlstrom | ae08961 | 2014-05-01 13:52:23 -0700 | [diff] [blame] | 79 | adb shell rm -rf data/run-test/test-*/dalvik-cache/* |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 80 | |
| 81 | ifneq ($(art_dont_bother),true) |
| 82 | |
| 83 | ######################################################################## |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 84 | # product targets |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 85 | include $(art_path)/runtime/Android.mk |
| 86 | include $(art_path)/compiler/Android.mk |
| 87 | include $(art_path)/dex2oat/Android.mk |
Ian Rogers | 02ed4c0 | 2013-09-06 13:10:04 -0700 | [diff] [blame] | 88 | include $(art_path)/disassembler/Android.mk |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 89 | include $(art_path)/oatdump/Android.mk |
Brian Carlstrom | fa50baa | 2013-08-02 01:00:27 -0700 | [diff] [blame] | 90 | include $(art_path)/dalvikvm/Android.mk |
Nicolas Geoffray | 9583fbc | 2014-02-28 15:21:07 +0000 | [diff] [blame] | 91 | include $(art_path)/tools/Android.mk |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 92 | include $(art_build_path)/Android.oat.mk |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame^] | 93 | include $(art_path)/sigchainlib/Android.mk |
| 94 | |
Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 95 | |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 96 | |
| 97 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 98 | # ART_HOST_DEPENDENCIES depends on Android.executable.mk above for ART_HOST_EXECUTABLES |
Brian Carlstrom | fd7ad0a | 2013-12-10 18:20:45 -0800 | [diff] [blame] | 99 | ART_HOST_DEPENDENCIES := $(ART_HOST_EXECUTABLES) $(HOST_OUT_JAVA_LIBRARIES)/core-libart-hostdex.jar |
Elliott Hughes | f1eedca | 2012-04-20 16:00:32 -0700 | [diff] [blame] | 100 | ART_HOST_DEPENDENCIES += $(HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) |
Brian Carlstrom | fd7ad0a | 2013-12-10 18:20:45 -0800 | [diff] [blame] | 101 | ART_TARGET_DEPENDENCIES := $(ART_TARGET_EXECUTABLES) $(TARGET_OUT_JAVA_LIBRARIES)/core-libart.jar $(TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so |
Andreas Gampe | fb040d0 | 2014-05-21 11:02:08 -0700 | [diff] [blame] | 102 | ifdef TARGET_2ND_ARCH |
| 103 | ART_TARGET_DEPENDENCIES += $(2ND_TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so |
| 104 | endif |
Brian Carlstrom | 1580379 | 2012-03-13 00:53:08 -0700 | [diff] [blame] | 105 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 106 | ######################################################################## |
| 107 | # test targets |
Brian Carlstrom | 1580379 | 2012-03-13 00:53:08 -0700 | [diff] [blame] | 108 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 109 | include $(art_path)/test/Android.mk |
| 110 | include $(art_build_path)/Android.gtest.mk |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 111 | |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 112 | $(eval $(call combine-art-multi-target-var,ART_TARGET_GTEST_TARGETS)) |
| 113 | $(eval $(call combine-art-multi-target-var,ART_TARGET_GTEST_EXECUTABLES)) |
| 114 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 115 | # The ART_*_TEST_DEPENDENCIES definitions: |
| 116 | # - depend on Android.oattest.mk above for ART_TEST_*_DEX_FILES |
Brian Carlstrom | a1ce1fe | 2014-02-24 23:23:58 -0800 | [diff] [blame] | 117 | # - depend on Android.gtest.mk above for ART_*_GTEST_EXECUTABLES |
| 118 | ART_HOST_TEST_DEPENDENCIES := $(ART_HOST_DEPENDENCIES) $(ART_HOST_GTEST_EXECUTABLES) $(ART_TEST_HOST_DEX_FILES) $(HOST_CORE_IMG_OUT) |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 119 | |
| 120 | define declare-art-target-test-dependencies-var |
| 121 | ART_TARGET_TEST_DEPENDENCIES$(1) := $(ART_TARGET_DEPENDENCIES) $(ART_TARGET_GTEST_EXECUTABLES$(1)) $(ART_TEST_TARGET_DEX_FILES$(1)) $(TARGET_CORE_IMG_OUT$(1)) |
| 122 | endef |
| 123 | $(eval $(call call-art-multi-target-var,declare-art-target-test-dependencies-var,ART_TARGET_TEST_DEPENDENCIES)) |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 124 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 125 | include $(art_build_path)/Android.libarttest.mk |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 126 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 127 | # "mm test-art" to build and run all tests on host and device |
| 128 | .PHONY: test-art |
| 129 | test-art: test-art-host test-art-target |
Brian Carlstrom | 395520e | 2011-09-25 19:35:00 -0700 | [diff] [blame] | 130 | @echo test-art PASSED |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 131 | |
Brian Carlstrom | 47a0d5a | 2011-10-12 21:20:05 -0700 | [diff] [blame] | 132 | .PHONY: test-art-gtest |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 133 | test-art-gtest: test-art-host-gtest test-art-target-gtest |
Brian Carlstrom | 47a0d5a | 2011-10-12 21:20:05 -0700 | [diff] [blame] | 134 | @echo test-art-gtest PASSED |
| 135 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 136 | .PHONY: test-art-oat |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 137 | test-art-oat: test-art-host-oat test-art-target-oat |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 138 | @echo test-art-oat PASSED |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 139 | |
Brian Carlstrom | 08981ab | 2012-05-25 18:40:15 -0700 | [diff] [blame] | 140 | .PHONY: test-art-run-test |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 141 | test-art-run-test: test-art-host-run-test test-art-target-run-test |
Brian Carlstrom | 08981ab | 2012-05-25 18:40:15 -0700 | [diff] [blame] | 142 | @echo test-art-run-test PASSED |
| 143 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 144 | ######################################################################## |
| 145 | # host test targets |
| 146 | |
Andreas Gampe | 3c03357 | 2014-05-13 08:41:48 -0700 | [diff] [blame] | 147 | .PHONY: test-art-host-vixl |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 148 | VIXL_TEST_DEPENDENCY := |
| 149 | # We can only run the vixl tests on 64-bit hosts (vixl testing issue) when its a |
| 150 | # top-level build (to declare the vixl test rule). |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 151 | ifneq ($(HOST_IS_64_BIT),) |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 152 | ifeq ($(ONE_SHOT_MAKEFILE),) |
| 153 | VIXL_TEST_DEPENDENCY := run-vixl-tests |
Andreas Gampe | 3c03357 | 2014-05-13 08:41:48 -0700 | [diff] [blame] | 154 | endif |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 155 | endif |
| 156 | |
| 157 | test-art-host-vixl: $(VIXL_TEST_DEPENDENCY) |
Andreas Gampe | 3c03357 | 2014-05-13 08:41:48 -0700 | [diff] [blame] | 158 | |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 159 | # "mm test-art-host" to build and run all host tests |
| 160 | .PHONY: test-art-host |
Andreas Gampe | 3c03357 | 2014-05-13 08:41:48 -0700 | [diff] [blame] | 161 | test-art-host: test-art-host-gtest test-art-host-oat test-art-host-run-test test-art-host-vixl |
Brian Carlstrom | 395520e | 2011-09-25 19:35:00 -0700 | [diff] [blame] | 162 | @echo test-art-host PASSED |
Brian Carlstrom | 59848da | 2011-07-23 20:35:19 -0700 | [diff] [blame] | 163 | |
Ian Rogers | 85d9ba6 | 2013-01-16 22:32:12 -0800 | [diff] [blame] | 164 | .PHONY: test-art-host-interpreter |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 165 | test-art-host-interpreter: test-art-host-oat-interpreter test-art-host-run-test-interpreter |
Ian Rogers | 85d9ba6 | 2013-01-16 22:32:12 -0800 | [diff] [blame] | 166 | @echo test-art-host-interpreter PASSED |
| 167 | |
Brian Carlstrom | b0aa9d3 | 2012-04-07 23:12:22 -0700 | [diff] [blame] | 168 | .PHONY: test-art-host-dependencies |
Brian Carlstrom | 4353486 | 2014-02-19 01:13:52 -0800 | [diff] [blame] | 169 | test-art-host-dependencies: $(ART_HOST_TEST_DEPENDENCIES) $(HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) $(HOST_CORE_DEX_LOCATIONS) |
Brian Carlstrom | b0aa9d3 | 2012-04-07 23:12:22 -0700 | [diff] [blame] | 170 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 171 | .PHONY: test-art-host-gtest |
Brian Carlstrom | a1ce1fe | 2014-02-24 23:23:58 -0800 | [diff] [blame] | 172 | test-art-host-gtest: $(ART_HOST_GTEST_TARGETS) |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 173 | @echo test-art-host-gtest PASSED |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 174 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 175 | # "mm valgrind-test-art-host-gtest" to build and run the host gtests under valgrind. |
| 176 | .PHONY: valgrind-test-art-host-gtest |
Brian Carlstrom | a1ce1fe | 2014-02-24 23:23:58 -0800 | [diff] [blame] | 177 | valgrind-test-art-host-gtest: $(ART_HOST_VALGRIND_GTEST_TARGETS) |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 178 | @echo valgrind-test-art-host-gtest PASSED |
| 179 | |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 180 | .PHONY: test-art-host-oat-default |
| 181 | test-art-host-oat-default: $(ART_TEST_HOST_OAT_DEFAULT_TARGETS) |
| 182 | @echo test-art-host-oat-default PASSED |
| 183 | |
| 184 | .PHONY: test-art-host-oat-interpreter |
| 185 | test-art-host-oat-interpreter: $(ART_TEST_HOST_OAT_INTERPRETER_TARGETS) |
| 186 | @echo test-art-host-oat-interpreter PASSED |
| 187 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 188 | .PHONY: test-art-host-oat |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 189 | test-art-host-oat: test-art-host-oat-default test-art-host-oat-interpreter |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 190 | @echo test-art-host-oat PASSED |
Elliott Hughes | 5511f21 | 2011-08-12 18:07:45 -0700 | [diff] [blame] | 191 | |
Brian Carlstrom | 4855cd5 | 2012-04-03 21:38:13 -0700 | [diff] [blame] | 192 | define declare-test-art-host-run-test |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 193 | .PHONY: test-art-host-run-test-default-$(1) |
Brian Carlstrom | 4353486 | 2014-02-19 01:13:52 -0800 | [diff] [blame] | 194 | test-art-host-run-test-default-$(1): test-art-host-dependencies $(DX) $(HOST_OUT_EXECUTABLES)/jasmin |
Mathieu Chartier | 769a5ad | 2014-05-18 15:30:10 -0700 | [diff] [blame] | 195 | DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) art/test/run-test $(addprefix --runtime-option ,$(DALVIKVM_FLAGS)) --host $(1) |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 196 | @echo test-art-host-run-test-default-$(1) PASSED |
Brian Carlstrom | 4855cd5 | 2012-04-03 21:38:13 -0700 | [diff] [blame] | 197 | |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 198 | TEST_ART_HOST_RUN_TEST_DEFAULT_TARGETS += test-art-host-run-test-default-$(1) |
Ian Rogers | 27cedf8 | 2012-11-21 11:42:43 -0800 | [diff] [blame] | 199 | |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 200 | .PHONY: test-art-host-run-test-interpreter-$(1) |
Brian Carlstrom | 4353486 | 2014-02-19 01:13:52 -0800 | [diff] [blame] | 201 | test-art-host-run-test-interpreter-$(1): test-art-host-dependencies $(DX) $(HOST_OUT_EXECUTABLES)/jasmin |
Mathieu Chartier | 769a5ad | 2014-05-18 15:30:10 -0700 | [diff] [blame] | 202 | DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) art/test/run-test $(addprefix --runtime-option ,$(DALVIKVM_FLAGS)) --host --interpreter $(1) |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 203 | @echo test-art-host-run-test-interpreter-$(1) PASSED |
Ian Rogers | 27cedf8 | 2012-11-21 11:42:43 -0800 | [diff] [blame] | 204 | |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 205 | TEST_ART_HOST_RUN_TEST_INTERPRETER_TARGETS += test-art-host-run-test-interpreter-$(1) |
Brian Carlstrom | a404db0 | 2013-08-28 09:37:40 -0700 | [diff] [blame] | 206 | |
| 207 | .PHONY: test-art-host-run-test-$(1) |
| 208 | test-art-host-run-test-$(1): test-art-host-run-test-default-$(1) test-art-host-run-test-interpreter-$(1) |
| 209 | |
Brian Carlstrom | 4855cd5 | 2012-04-03 21:38:13 -0700 | [diff] [blame] | 210 | endef |
| 211 | |
Brian Carlstrom | 934ce80 | 2014-04-01 18:09:33 -0700 | [diff] [blame] | 212 | $(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call declare-test-art-host-run-test,$(test)))) |
Brian Carlstrom | 4855cd5 | 2012-04-03 21:38:13 -0700 | [diff] [blame] | 213 | |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 214 | .PHONY: test-art-host-run-test-default |
| 215 | test-art-host-run-test-default: $(TEST_ART_HOST_RUN_TEST_DEFAULT_TARGETS) |
| 216 | @echo test-art-host-run-test-default PASSED |
Brian Carlstrom | 4855cd5 | 2012-04-03 21:38:13 -0700 | [diff] [blame] | 217 | |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 218 | .PHONY: test-art-host-run-test-interpreter |
| 219 | test-art-host-run-test-interpreter: $(TEST_ART_HOST_RUN_TEST_INTERPRETER_TARGETS) |
| 220 | @echo test-art-host-run-test-interpreter PASSED |
| 221 | |
| 222 | .PHONY: test-art-host-run-test |
| 223 | test-art-host-run-test: test-art-host-run-test-default test-art-host-run-test-interpreter |
| 224 | @echo test-art-host-run-test PASSED |
Ian Rogers | 27cedf8 | 2012-11-21 11:42:43 -0800 | [diff] [blame] | 225 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 226 | ######################################################################## |
| 227 | # target test targets |
| 228 | |
| 229 | # "mm test-art-target" to build and run all target tests |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 230 | define declare-test-art-target |
| 231 | .PHONY: test-art-target$(1) |
| 232 | test-art-target$(1): test-art-target-gtest$(1) test-art-target-oat$(1) test-art-target-run-test$(1) |
| 233 | @echo test-art-target$(1) PASSED |
| 234 | endef |
| 235 | $(eval $(call call-art-multi-target-rule,declare-test-art-target,test-art-target)) |
Brian Carlstrom | 8692721 | 2011-09-15 11:31:11 -0700 | [diff] [blame] | 236 | |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 237 | define declare-test-art-target-dependencies |
| 238 | .PHONY: test-art-target-dependencies$(1) |
Brian Carlstrom | 0e12bdc | 2014-05-14 17:44:28 -0700 | [diff] [blame] | 239 | test-art-target-dependencies$(1): $(ART_TARGET_TEST_DEPENDENCIES$(1)) $(ART_TARGET_LIBARTTEST_$(1)) |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 240 | endef |
| 241 | $(eval $(call call-art-multi-target-rule,declare-test-art-target-dependencies,test-art-target-dependencies)) |
| 242 | |
Brian Carlstrom | b0aa9d3 | 2012-04-07 23:12:22 -0700 | [diff] [blame] | 243 | |
Brian Carlstrom | 8692721 | 2011-09-15 11:31:11 -0700 | [diff] [blame] | 244 | .PHONY: test-art-target-sync |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 245 | test-art-target-sync: test-art-target-dependencies$(ART_PHONY_TEST_TARGET_SUFFIX) test-art-target-dependencies$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 246 | adb remount |
| 247 | adb sync |
Brian Carlstrom | 47a0d5a | 2011-10-12 21:20:05 -0700 | [diff] [blame] | 248 | adb shell mkdir -p $(ART_TEST_DIR) |
Brian Carlstrom | 8692721 | 2011-09-15 11:31:11 -0700 | [diff] [blame] | 249 | |
Brian Carlstrom | 8692721 | 2011-09-15 11:31:11 -0700 | [diff] [blame] | 250 | |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 251 | define declare-test-art-target-gtest |
| 252 | .PHONY: test-art-target-gtest$(1) |
| 253 | test-art-target-gtest$(1): $(ART_TARGET_GTEST_TARGETS$(1)) |
Andreas Gampe | a63229c | 2014-04-21 09:51:07 -0700 | [diff] [blame] | 254 | @echo test-art-target-gtest$(1) PASSED |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 255 | endef |
| 256 | $(eval $(call call-art-multi-target-rule,declare-test-art-target-gtest,test-art-target-gtest)) |
| 257 | |
| 258 | |
| 259 | define declare-test-art-target-oat |
| 260 | .PHONY: test-art-target-oat$(1) |
| 261 | test-art-target-oat$(1): $(ART_TEST_TARGET_OAT_TARGETS$(1)) |
| 262 | @echo test-art-target-oat$(1) PASSED |
| 263 | endef |
| 264 | $(eval $(call call-art-multi-target-rule,declare-test-art-target-oat,test-art-target-oat)) |
| 265 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 266 | |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 267 | define declare-test-art-target-run-test-impl |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 268 | $(2)run_test_$(1) := |
| 269 | ifeq ($($(2)ART_PHONY_TEST_TARGET_SUFFIX),64) |
| 270 | $(2)run_test_$(1) := --64 |
| 271 | endif |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 272 | .PHONY: test-art-target-run-test-$(1)$($(2)ART_PHONY_TEST_TARGET_SUFFIX) |
| 273 | test-art-target-run-test-$(1)$($(2)ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-sync $(DX) $(HOST_OUT_EXECUTABLES)/jasmin |
Mathieu Chartier | 769a5ad | 2014-05-18 15:30:10 -0700 | [diff] [blame] | 274 | DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) art/test/run-test $(addprefix --runtime-option ,$(DALVIKVM_FLAGS)) $$($(2)run_test_$(1)) $(1) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 275 | @echo test-art-target-run-test-$(1)$($(2)ART_PHONY_TEST_TARGET_SUFFIX) PASSED |
| 276 | endef |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 277 | |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 278 | define declare-test-art-target-run-test |
| 279 | |
| 280 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 281 | $(call declare-test-art-target-run-test-impl,$(1),2ND_) |
| 282 | |
| 283 | TEST_ART_TARGET_RUN_TEST_TARGETS$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) += test-art-target-run-test-$(1)$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 284 | |
| 285 | ifneq ($(ART_PHONY_TEST_TARGET_SUFFIX),) |
| 286 | # Link primary to non-suffix |
| 287 | test-art-target-run-test-$(1): test-art-target-run-test-$(1)$(ART_PHONY_TEST_TARGET_SUFFIX) |
| 288 | endif |
| 289 | endif |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 290 | $(call declare-test-art-target-run-test-impl,$(1),) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 291 | |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 292 | TEST_ART_TARGET_RUN_TEST_TARGETS$(ART_PHONY_TEST_TARGET_SUFFIX) += test-art-target-run-test-$(1)$(ART_PHONY_TEST_TARGET_SUFFIX) |
Brian Carlstrom | a404db0 | 2013-08-28 09:37:40 -0700 | [diff] [blame] | 293 | |
| 294 | test-art-run-test-$(1): test-art-host-run-test-$(1) test-art-target-run-test-$(1) |
| 295 | |
Brian Carlstrom | 37c4444 | 2012-03-06 22:21:18 -0800 | [diff] [blame] | 296 | endef |
| 297 | |
Brian Carlstrom | 934ce80 | 2014-04-01 18:09:33 -0700 | [diff] [blame] | 298 | $(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call declare-test-art-target-run-test,$(test)))) |
Brian Carlstrom | 37c4444 | 2012-03-06 22:21:18 -0800 | [diff] [blame] | 299 | |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 300 | |
| 301 | define declare-test-art-target-run-test |
| 302 | .PHONY: test-art-target-run-test$(1) |
| 303 | test-art-target-run-test$(1): $(TEST_ART_TARGET_RUN_TEST_TARGETS$(1)) |
| 304 | @echo test-art-target-run-test$(1) PASSED |
| 305 | endef |
| 306 | $(eval $(call call-art-multi-target-rule,declare-test-art-target-run-test,test-art-target-run-test)) |
| 307 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 308 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 309 | ######################################################################## |
Brian Carlstrom | 04941d9 | 2012-02-19 01:47:51 -0800 | [diff] [blame] | 310 | # oat-target and oat-target-sync targets |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 311 | |
Brian Carlstrom | 04941d9 | 2012-02-19 01:47:51 -0800 | [diff] [blame] | 312 | OAT_TARGET_TARGETS := |
| 313 | |
| 314 | # $(1): input jar or apk target location |
| 315 | define declare-oat-target-target |
Brian Carlstrom | 46b8a62 | 2012-06-19 23:13:22 -0700 | [diff] [blame] | 316 | ifneq (,$(filter $(1),$(addprefix system/app/,$(addsuffix .apk,$(PRODUCT_DEX_PREOPT_PACKAGES_IN_DATA))))) |
Brian Carlstrom | 999cd43 | 2013-06-22 23:08:53 -0700 | [diff] [blame] | 317 | OUT_OAT_FILE := $(call dalvik-cache-out,$(1)/classes.dex) |
Brian Carlstrom | 46b8a62 | 2012-06-19 23:13:22 -0700 | [diff] [blame] | 318 | else |
Brian Carlstrom | 999cd43 | 2013-06-22 23:08:53 -0700 | [diff] [blame] | 319 | OUT_OAT_FILE := $(PRODUCT_OUT)/$(basename $(1)).odex |
Brian Carlstrom | 46b8a62 | 2012-06-19 23:13:22 -0700 | [diff] [blame] | 320 | endif |
Shih-wei Liao | 2e01f24 | 2012-05-28 03:11:59 -0700 | [diff] [blame] | 321 | |
| 322 | ifeq ($(ONE_SHOT_MAKEFILE),) |
Brian Carlstrom | 90e2741 | 2013-03-13 21:51:47 -0700 | [diff] [blame] | 323 | # ONE_SHOT_MAKEFILE is empty for a top level build and we don't want |
| 324 | # to define the oat-target-* rules there because they will conflict |
| 325 | # with the build/core/dex_preopt.mk defined rules. |
Brian Carlstrom | 04941d9 | 2012-02-19 01:47:51 -0800 | [diff] [blame] | 326 | .PHONY: oat-target-$(1) |
Brian Carlstrom | 90e2741 | 2013-03-13 21:51:47 -0700 | [diff] [blame] | 327 | oat-target-$(1): |
Shih-wei Liao | 2e01f24 | 2012-05-28 03:11:59 -0700 | [diff] [blame] | 328 | |
| 329 | else |
| 330 | .PHONY: oat-target-$(1) |
Shih-wei Liao | 7eea0e8 | 2012-05-28 23:56:21 -0700 | [diff] [blame] | 331 | oat-target-$(1): $$(OUT_OAT_FILE) |
Shih-wei Liao | 2e01f24 | 2012-05-28 03:11:59 -0700 | [diff] [blame] | 332 | |
Nicolas Geoffray | 1db132d | 2014-03-26 10:56:24 +0000 | [diff] [blame] | 333 | $$(OUT_OAT_FILE): $(PRODUCT_OUT)/$(1) $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) $(DEX2OATD_DEPENDENCY) |
Brian Carlstrom | 90e2741 | 2013-03-13 21:51:47 -0700 | [diff] [blame] | 334 | @mkdir -p $$(dir $$@) |
Ian Rogers | 9b79776 | 2014-04-18 15:40:37 -0700 | [diff] [blame] | 335 | $(DEX2OATD) --runtime-arg -Xms64m --runtime-arg -Xmx64m \ |
| 336 | --boot-image=$(DEFAULT_DEX_PREOPT_BUILT_IMAGE) --dex-file=$(PRODUCT_OUT)/$(1) \ |
| 337 | --dex-location=/$(1) --oat-file=$$@ \ |
| 338 | --instruction-set=$(DEX2OAT_TARGET_ARCH) \ |
| 339 | --instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \ |
| 340 | --android-root=$(PRODUCT_OUT)/system |
Shih-wei Liao | 2e01f24 | 2012-05-28 03:11:59 -0700 | [diff] [blame] | 341 | |
| 342 | endif |
Brian Carlstrom | 04941d9 | 2012-02-19 01:47:51 -0800 | [diff] [blame] | 343 | |
| 344 | OAT_TARGET_TARGETS += oat-target-$(1) |
Brian Carlstrom | a9f1978 | 2011-10-13 00:14:47 -0700 | [diff] [blame] | 345 | endef |
| 346 | |
Brian Carlstrom | bd41102 | 2012-02-07 12:09:09 -0800 | [diff] [blame] | 347 | $(foreach file,\ |
| 348 | $(filter-out\ |
Brian Carlstrom | 7ab763c | 2013-12-09 00:38:02 -0800 | [diff] [blame] | 349 | $(addprefix $(TARGET_OUT_JAVA_LIBRARIES)/,$(addsuffix .jar,$(LIBART_TARGET_BOOT_JARS))),\ |
Brian Carlstrom | bd41102 | 2012-02-07 12:09:09 -0800 | [diff] [blame] | 350 | $(wildcard $(TARGET_OUT_APPS)/*.apk) $(wildcard $(TARGET_OUT_JAVA_LIBRARIES)/*.jar)),\ |
Brian Carlstrom | 04941d9 | 2012-02-19 01:47:51 -0800 | [diff] [blame] | 351 | $(eval $(call declare-oat-target-target,$(subst $(PRODUCT_OUT)/,,$(file))))) |
| 352 | |
| 353 | .PHONY: oat-target |
Brian Carlstrom | 7ab763c | 2013-12-09 00:38:02 -0800 | [diff] [blame] | 354 | oat-target: $(ART_TARGET_DEPENDENCIES) $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) $(OAT_TARGET_TARGETS) |
Ian Rogers | beb60e2 | 2012-01-31 10:40:40 -0800 | [diff] [blame] | 355 | |
Brian Carlstrom | a6cc893 | 2012-01-04 14:44:07 -0800 | [diff] [blame] | 356 | .PHONY: oat-target-sync |
Brian Carlstrom | 04941d9 | 2012-02-19 01:47:51 -0800 | [diff] [blame] | 357 | oat-target-sync: oat-target |
Brian Carlstrom | 0796af0 | 2011-10-12 14:31:45 -0700 | [diff] [blame] | 358 | adb remount |
| 359 | adb sync |
| 360 | |
Brian Carlstrom | 76aa0c0 | 2011-10-11 15:29:43 -0700 | [diff] [blame] | 361 | ######################################################################## |
Brian Carlstrom | fa50baa | 2013-08-02 01:00:27 -0700 | [diff] [blame] | 362 | # "m build-art" for quick minimal build |
| 363 | .PHONY: build-art |
| 364 | build-art: build-art-host build-art-target |
| 365 | |
| 366 | .PHONY: build-art-host |
Brian Carlstrom | a1ce1fe | 2014-02-24 23:23:58 -0800 | [diff] [blame] | 367 | build-art-host: $(ART_HOST_EXECUTABLES) $(ART_HOST_GTEST_EXECUTABLES) $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so |
Brian Carlstrom | fa50baa | 2013-08-02 01:00:27 -0700 | [diff] [blame] | 368 | |
| 369 | .PHONY: build-art-target |
Brian Carlstrom | a1ce1fe | 2014-02-24 23:23:58 -0800 | [diff] [blame] | 370 | build-art-target: $(ART_TARGET_EXECUTABLES) $(ART_TARGET_GTEST_EXECUTABLES) $(TARGET_CORE_IMG_OUT) $(TARGET_OUT)/lib/libjavacore.so |
Brian Carlstrom | fa50baa | 2013-08-02 01:00:27 -0700 | [diff] [blame] | 371 | |
| 372 | ######################################################################## |
Nicolas Geoffray | 9583fbc | 2014-02-28 15:21:07 +0000 | [diff] [blame] | 373 | # "m art-host" for just building the files needed to run the art script |
| 374 | .PHONY: art-host |
Nicolas Geoffray | 27a935a | 2014-05-20 09:43:15 +0100 | [diff] [blame] | 375 | art-host: $(HOST_OUT_EXECUTABLES)/art $(HOST_OUT)/bin/dalvikvm $(HOST_OUT)/lib/libart.so $(HOST_OUT)/bin/dex2oat $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so |
Nicolas Geoffray | 9583fbc | 2014-02-28 15:21:07 +0000 | [diff] [blame] | 376 | |
| 377 | .PHONY: art-host-debug |
| 378 | art-host-debug: art-host $(HOST_OUT)/lib/libartd.so $(HOST_OUT)/bin/dex2oatd |
| 379 | |
| 380 | ######################################################################## |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 381 | # oatdump targets |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 382 | |
Ian Rogers | fa82427 | 2013-11-05 16:12:57 -0800 | [diff] [blame] | 383 | ART_DUMP_OAT_PATH ?= $(OUT_DIR) |
| 384 | |
Brian Carlstrom | 7ab763c | 2013-12-09 00:38:02 -0800 | [diff] [blame] | 385 | OATDUMP := $(HOST_OUT_EXECUTABLES)/oatdump$(HOST_EXECUTABLE_SUFFIX) |
| 386 | OATDUMPD := $(HOST_OUT_EXECUTABLES)/oatdumpd$(HOST_EXECUTABLE_SUFFIX) |
| 387 | # TODO: for now, override with debug version for better error reporting |
| 388 | OATDUMP := $(OATDUMPD) |
| 389 | |
Brian Carlstrom | 395520e | 2011-09-25 19:35:00 -0700 | [diff] [blame] | 390 | .PHONY: dump-oat |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 391 | dump-oat: dump-oat-core dump-oat-boot |
Brian Carlstrom | 395520e | 2011-09-25 19:35:00 -0700 | [diff] [blame] | 392 | |
Brian Carlstrom | e10b697 | 2011-09-26 13:49:03 -0700 | [diff] [blame] | 393 | .PHONY: dump-oat-core |
Brian Carlstrom | 13c492b | 2012-03-22 17:09:17 -0700 | [diff] [blame] | 394 | dump-oat-core: dump-oat-core-host dump-oat-core-target |
| 395 | |
| 396 | .PHONY: dump-oat-core-host |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 397 | ifeq ($(ART_BUILD_HOST),true) |
Brian Carlstrom | 13c492b | 2012-03-22 17:09:17 -0700 | [diff] [blame] | 398 | dump-oat-core-host: $(HOST_CORE_IMG_OUT) $(OATDUMP) |
Brian Carlstrom | 0e12bdc | 2014-05-14 17:44:28 -0700 | [diff] [blame] | 399 | $(OATDUMP) --image=$(HOST_CORE_IMG_LOCATION) --output=$(ART_DUMP_OAT_PATH)/core.host.oatdump.txt |
Ian Rogers | fa82427 | 2013-11-05 16:12:57 -0800 | [diff] [blame] | 400 | @echo Output in $(ART_DUMP_OAT_PATH)/core.host.oatdump.txt |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 401 | endif |
Brian Carlstrom | 13c492b | 2012-03-22 17:09:17 -0700 | [diff] [blame] | 402 | |
| 403 | .PHONY: dump-oat-core-target |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 404 | ifeq ($(ART_BUILD_TARGET),true) |
Brian Carlstrom | 13c492b | 2012-03-22 17:09:17 -0700 | [diff] [blame] | 405 | dump-oat-core-target: $(TARGET_CORE_IMG_OUT) $(OATDUMP) |
Brian Carlstrom | 0f5baa0 | 2014-05-22 11:54:18 -0700 | [diff] [blame] | 406 | $(OATDUMP) --image=$(TARGET_CORE_IMG_LOCATION) --output=$(ART_DUMP_OAT_PATH)/core.target.oatdump.txt --instruction-set=$(TARGET_ARCH) |
Ian Rogers | fa82427 | 2013-11-05 16:12:57 -0800 | [diff] [blame] | 407 | @echo Output in $(ART_DUMP_OAT_PATH)/core.target.oatdump.txt |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 408 | endif |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 409 | |
Brian Carlstrom | 7a6b280 | 2014-05-25 14:38:17 -0700 | [diff] [blame] | 410 | .PHONY: dump-oat-boot-$(TARGET_ARCH) |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 411 | ifeq ($(ART_BUILD_TARGET_NDEBUG),true) |
Brian Carlstrom | 7a6b280 | 2014-05-25 14:38:17 -0700 | [diff] [blame] | 412 | dump-oat-boot-$(TARGET_ARCH): $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) $(OATDUMP) |
| 413 | $(OATDUMP) --image=$(DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION) --output=$(ART_DUMP_OAT_PATH)/boot.$(TARGET_ARCH).oatdump.txt --instruction-set=$(TARGET_ARCH) |
| 414 | @echo Output in $(ART_DUMP_OAT_PATH)/boot.$(TARGET_ARCH).oatdump.txt |
| 415 | endif |
| 416 | |
| 417 | ifdef TARGET_2ND_ARCH |
| 418 | dump-oat-boot-$(TARGET_2ND_ARCH): $(2ND_DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) $(OATDUMP) |
| 419 | $(OATDUMP) --image=$(2ND_DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION) --output=$(ART_DUMP_OAT_PATH)/boot.$(TARGET_2ND_ARCH).oatdump.txt --instruction-set=$(TARGET_2ND_ARCH) |
| 420 | @echo Output in $(ART_DUMP_OAT_PATH)/boot.$(TARGET_2ND_ARCH).oatdump.txt |
| 421 | endif |
| 422 | |
| 423 | .PHONY: dump-oat-boot |
| 424 | dump-oat-boot: dump-oat-boot-$(TARGET_ARCH) |
| 425 | ifdef TARGET_2ND_ARCH |
| 426 | dump-oat-boot: dump-oat-boot-$(TARGET_2ND_ARCH) |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 427 | endif |
Brian Carlstrom | 78128a6 | 2011-09-15 17:21:19 -0700 | [diff] [blame] | 428 | |
Brian Carlstrom | 2e92fd6 | 2012-10-18 00:04:10 -0700 | [diff] [blame] | 429 | .PHONY: dump-oat-Calculator |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 430 | ifeq ($(ART_BUILD_TARGET_NDEBUG),true) |
Brian Carlstrom | 7ab763c | 2013-12-09 00:38:02 -0800 | [diff] [blame] | 431 | dump-oat-Calculator: $(TARGET_OUT_APPS)/Calculator.odex $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) $(OATDUMP) |
Ian Rogers | fa82427 | 2013-11-05 16:12:57 -0800 | [diff] [blame] | 432 | $(OATDUMP) --oat-file=$< --output=$(ART_DUMP_OAT_PATH)/Calculator.oatdump.txt |
| 433 | @echo Output in $(ART_DUMP_OAT_PATH)/Calculator.oatdump.txt |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 434 | endif |
Brian Carlstrom | 2e92fd6 | 2012-10-18 00:04:10 -0700 | [diff] [blame] | 435 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 436 | ######################################################################## |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 437 | # cpplint targets to style check art source files |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 438 | |
Brian Carlstrom | 05eecea | 2013-07-18 21:59:52 -0700 | [diff] [blame] | 439 | include $(art_build_path)/Android.cpplint.mk |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 440 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 441 | ######################################################################## |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 442 | # targets to switch back and forth from libdvm to libart |
| 443 | |
| 444 | .PHONY: use-art |
| 445 | use-art: |
| 446 | adb root && sleep 3 |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 447 | adb shell stop |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 448 | adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 449 | adb shell start |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 450 | |
| 451 | .PHONY: use-artd |
| 452 | use-artd: |
| 453 | adb root && sleep 3 |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 454 | adb shell stop |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 455 | adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 456 | adb shell start |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 457 | |
| 458 | .PHONY: use-dalvik |
| 459 | use-dalvik: |
| 460 | adb root && sleep 3 |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 461 | adb shell stop |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 462 | adb shell setprop persist.sys.dalvik.vm.lib.2 libdvm.so |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 463 | adb shell start |
| 464 | |
| 465 | .PHONY: use-art-full |
| 466 | use-art-full: |
| 467 | adb root && sleep 3 |
| 468 | adb shell stop |
Brian Carlstrom | 83ae6d2 | 2014-05-09 16:08:48 -0700 | [diff] [blame] | 469 | adb shell rm -rf $(ART_DALVIK_CACHE_DIR)/* |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 470 | adb shell setprop dalvik.vm.dex2oat-flags "" |
| 471 | adb shell setprop dalvik.vm.image-dex2oat-flags "" |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 472 | adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 473 | adb shell start |
| 474 | |
Hiroshi Yamauchi | cb9bccd | 2014-05-19 12:29:36 -0700 | [diff] [blame] | 475 | .PHONY: use-artd-full |
| 476 | use-artd-full: |
| 477 | adb root && sleep 3 |
| 478 | adb shell stop |
| 479 | adb shell rm -rf $(ART_DALVIK_CACHE_DIR)/* |
| 480 | adb shell setprop dalvik.vm.dex2oat-flags "" |
| 481 | adb shell setprop dalvik.vm.image-dex2oat-flags "" |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 482 | adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so |
Hiroshi Yamauchi | cb9bccd | 2014-05-19 12:29:36 -0700 | [diff] [blame] | 483 | adb shell start |
| 484 | |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 485 | .PHONY: use-art-smart |
| 486 | use-art-smart: |
| 487 | adb root && sleep 3 |
| 488 | adb shell stop |
Brian Carlstrom | 83ae6d2 | 2014-05-09 16:08:48 -0700 | [diff] [blame] | 489 | adb shell rm -rf $(ART_DALVIK_CACHE_DIR)/* |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 490 | adb shell setprop dalvik.vm.dex2oat-flags "--compiler-filter=interpret-only" |
| 491 | adb shell setprop dalvik.vm.image-dex2oat-flags "" |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 492 | adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 493 | adb shell start |
| 494 | |
| 495 | .PHONY: use-art-interpret-only |
| 496 | use-art-interpret-only: |
| 497 | adb root && sleep 3 |
| 498 | adb shell stop |
Brian Carlstrom | 83ae6d2 | 2014-05-09 16:08:48 -0700 | [diff] [blame] | 499 | adb shell rm -rf $(ART_DALVIK_CACHE_DIR)/* |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 500 | adb shell setprop dalvik.vm.dex2oat-flags "--compiler-filter=interpret-only" |
| 501 | adb shell setprop dalvik.vm.image-dex2oat-flags "--compiler-filter=interpret-only" |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 502 | adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 503 | adb shell start |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 504 | |
Jeff Hao | 4a200f5 | 2014-04-01 14:58:49 -0700 | [diff] [blame] | 505 | .PHONY: use-art-verify-none |
| 506 | use-art-verify-none: |
| 507 | adb root && sleep 3 |
| 508 | adb shell stop |
Brian Carlstrom | 83ae6d2 | 2014-05-09 16:08:48 -0700 | [diff] [blame] | 509 | adb shell rm -rf $(ART_DALVIK_CACHE_DIR)/* |
Jeff Hao | 4a200f5 | 2014-04-01 14:58:49 -0700 | [diff] [blame] | 510 | adb shell setprop dalvik.vm.dex2oat-flags "--compiler-filter=verify-none" |
| 511 | adb shell setprop dalvik.vm.image-dex2oat-flags "--compiler-filter=verify-none" |
Brian Carlstrom | 346265e | 2014-05-28 14:56:39 -0700 | [diff] [blame] | 512 | adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
Jeff Hao | 4a200f5 | 2014-04-01 14:58:49 -0700 | [diff] [blame] | 513 | adb shell start |
| 514 | |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 515 | ######################################################################## |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 516 | |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 517 | endif # !art_dont_bother |