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) |
Brian Carlstrom | cdc8de4 | 2011-07-19 14:23:17 -0700 | [diff] [blame] | 20 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 21 | ######################################################################## |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 22 | # clean-oat rules |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 23 | # |
| 24 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 25 | include $(art_path)/build/Android.common_path.mk |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 26 | include $(art_path)/build/Android.oat.mk |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 27 | |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 28 | .PHONY: clean-oat |
| 29 | clean-oat: clean-oat-host clean-oat-target |
| 30 | |
| 31 | .PHONY: clean-oat-host |
| 32 | clean-oat-host: |
Andreas Gampe | 602b785 | 2017-02-21 11:44:04 -0800 | [diff] [blame] | 33 | find $(OUT_DIR) -name "*.oat" -o -name "*.odex" -o -name "*.art" -o -name '*.vdex' | xargs rm -f |
Dan Willemsen | 0104606 | 2019-01-02 13:39:29 -0800 | [diff] [blame] | 34 | rm -rf $(TMPDIR)/*/test-*/dalvik-cache/* |
Andreas Gampe | 5a79fde | 2014-08-06 13:12:26 -0700 | [diff] [blame] | 35 | rm -rf $(TMPDIR)/android-data/dalvik-cache/* |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 36 | |
| 37 | .PHONY: clean-oat-target |
| 38 | clean-oat-target: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 39 | $(ADB) root |
| 40 | $(ADB) wait-for-device remount |
| 41 | $(ADB) shell rm -rf $(ART_TARGET_NATIVETEST_DIR) |
| 42 | $(ADB) shell rm -rf $(ART_TARGET_TEST_DIR) |
| 43 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*/* |
Nicolas Geoffray | a144c27 | 2019-02-20 12:03:53 +0000 | [diff] [blame] | 44 | $(ADB) shell rm -rf $(ART_DEXPREOPT_BOOT_JAR_DIR)/$(DEX2OAT_TARGET_ARCH) |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 45 | $(ADB) shell rm -rf system/app/$(DEX2OAT_TARGET_ARCH) |
Brian Carlstrom | f662e06 | 2014-05-19 16:09:42 -0700 | [diff] [blame] | 46 | ifdef TARGET_2ND_ARCH |
Nicolas Geoffray | a144c27 | 2019-02-20 12:03:53 +0000 | [diff] [blame] | 47 | $(ADB) shell rm -rf $(ART_DEXPREOPT_BOOT_JAR_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 48 | $(ADB) shell rm -rf system/app/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) |
Brian Carlstrom | f662e06 | 2014-05-19 16:09:42 -0700 | [diff] [blame] | 49 | endif |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 50 | $(ADB) shell rm -rf data/run-test/test-*/dalvik-cache/* |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 51 | |
Brian Carlstrom | 62e3ee3 | 2012-06-18 14:58:55 -0700 | [diff] [blame] | 52 | ######################################################################## |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 53 | # cpplint rules to style check art source files |
| 54 | |
| 55 | include $(art_path)/build/Android.cpplint.mk |
| 56 | |
| 57 | ######################################################################## |
| 58 | # product rules |
| 59 | |
Colin Cross | 35235cb | 2016-09-09 11:19:32 -0700 | [diff] [blame] | 60 | include $(art_path)/oatdump/Android.mk |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 61 | include $(art_path)/tools/ahat/Android.mk |
Stephen Kyle | 959ffdf | 2014-11-28 14:27:44 +0000 | [diff] [blame] | 62 | include $(art_path)/tools/dexfuzz/Android.mk |
Nicolas Geoffray | d1ef717 | 2018-03-28 09:16:31 +0100 | [diff] [blame] | 63 | include $(art_path)/tools/veridex/Android.mk |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 64 | |
Brian Carlstrom | 532714a | 2014-06-25 02:15:31 -0700 | [diff] [blame] | 65 | ART_HOST_DEPENDENCIES := \ |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 66 | $(ART_HOST_EXECUTABLES) \ |
| 67 | $(ART_HOST_DEX_DEPENDENCIES) \ |
| 68 | $(ART_HOST_SHARED_LIBRARY_DEPENDENCIES) |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 69 | |
| 70 | ifeq ($(ART_BUILD_HOST_DEBUG),true) |
| 71 | ART_HOST_DEPENDENCIES += $(ART_HOST_SHARED_LIBRARY_DEBUG_DEPENDENCIES) |
| 72 | endif |
| 73 | |
Brian Carlstrom | 532714a | 2014-06-25 02:15:31 -0700 | [diff] [blame] | 74 | ART_TARGET_DEPENDENCIES := \ |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 75 | $(ART_TARGET_EXECUTABLES) \ |
| 76 | $(ART_TARGET_DEX_DEPENDENCIES) \ |
| 77 | $(ART_TARGET_SHARED_LIBRARY_DEPENDENCIES) |
Brian Carlstrom | 1580379 | 2012-03-13 00:53:08 -0700 | [diff] [blame] | 78 | |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 79 | ifeq ($(ART_BUILD_TARGET_DEBUG),true) |
| 80 | ART_TARGET_DEPENDENCIES += $(ART_TARGET_SHARED_LIBRARY_DEBUG_DEPENDENCIES) |
| 81 | endif |
| 82 | |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 83 | ######################################################################## |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 84 | # test rules |
Brian Carlstrom | 1580379 | 2012-03-13 00:53:08 -0700 | [diff] [blame] | 85 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 86 | # All the dependencies that must be built ahead of sync-ing them onto the target device. |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 87 | TEST_ART_TARGET_SYNC_DEPS := $(ADB_EXECUTABLE) |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 88 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 89 | include $(art_path)/build/Android.common_test.mk |
| 90 | include $(art_path)/build/Android.gtest.mk |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 91 | include $(art_path)/test/Android.run-test.mk |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 92 | |
Nicolas Geoffray | 375d4eb | 2018-10-12 15:23:56 +0100 | [diff] [blame] | 93 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TEST_TARGET_GTEST_DEPENDENCIES) $(ART_TEST_TARGET_RUN_TEST_DEPENDENCIES) |
Nicolas Geoffray | 17b1dcb | 2018-10-12 15:09:42 +0100 | [diff] [blame] | 94 | |
Roland Levillain | 5798195 | 2018-08-03 14:06:21 +0100 | [diff] [blame] | 95 | # Make sure /system is writable on the device. |
Alex Light | 53fc75a | 2015-11-20 15:35:48 -0800 | [diff] [blame] | 96 | TEST_ART_ADB_ROOT_AND_REMOUNT := \ |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 97 | ($(ADB) root && \ |
| 98 | $(ADB) wait-for-device remount && \ |
| 99 | (($(ADB) shell touch /system/testfile && \ |
| 100 | ($(ADB) shell rm /system/testfile || true)) || \ |
| 101 | ($(ADB) disable-verity && \ |
| 102 | $(ADB) reboot && \ |
| 103 | $(ADB) wait-for-device root && \ |
| 104 | $(ADB) wait-for-device remount))) |
Alex Light | 53fc75a | 2015-11-20 15:35:48 -0800 | [diff] [blame] | 105 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 106 | # Sync test files to the target, depends upon all things that must be pushed to the target. |
| 107 | .PHONY: test-art-target-sync |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 108 | # Check if we need to sync. In case ART_TEST_CHROOT or ART_TEST_ANDROID_ROOT |
| 109 | # is not empty, the code below uses 'adb push' instead of 'adb sync', |
| 110 | # which does not check if the files on the device have changed. |
| 111 | # TODO: Remove support for ART_TEST_ANDROID_ROOT when it is no longer needed. |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 112 | ifneq ($(ART_TEST_NO_SYNC),true) |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 113 | # Sync system and data partitions. |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 114 | ifeq ($(ART_TEST_ANDROID_ROOT),) |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 115 | ifeq ($(ART_TEST_CHROOT),) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 116 | test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS) |
Alex Light | 53fc75a | 2015-11-20 15:35:48 -0800 | [diff] [blame] | 117 | $(TEST_ART_ADB_ROOT_AND_REMOUNT) |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 118 | $(ADB) sync system && $(ADB) sync data |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 119 | else |
Roland Levillain | 5798195 | 2018-08-03 14:06:21 +0100 | [diff] [blame] | 120 | # TEST_ART_ADB_ROOT_AND_REMOUNT is not needed here, as we are only |
| 121 | # pushing things to the chroot dir, which is expected to be under |
| 122 | # /data on the device. |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 123 | test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS) |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 124 | $(ADB) wait-for-device |
| 125 | $(ADB) push $(PRODUCT_OUT)/system $(ART_TEST_CHROOT)/ |
| 126 | $(ADB) push $(PRODUCT_OUT)/data $(ART_TEST_CHROOT)/ |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 127 | endif |
| 128 | else |
| 129 | test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS) |
| 130 | $(TEST_ART_ADB_ROOT_AND_REMOUNT) |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 131 | $(ADB) wait-for-device |
| 132 | $(ADB) push $(PRODUCT_OUT)/system $(ART_TEST_CHROOT)$(ART_TEST_ANDROID_ROOT) |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 133 | # Push the contents of the `data` dir into `$(ART_TEST_CHROOT)/data` on the device (note |
| 134 | # that $(ART_TEST_CHROOT) can be empty). If `$(ART_TEST_CHROOT)/data` already exists on |
| 135 | # the device, it is not overwritten, but its content is updated. |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 136 | $(ADB) push $(PRODUCT_OUT)/data $(ART_TEST_CHROOT)/ |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 137 | endif |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 138 | endif |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 139 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 140 | # "mm test-art" to build and run all tests on host and device |
| 141 | .PHONY: test-art |
| 142 | test-art: test-art-host test-art-target |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 143 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 144 | |
Brian Carlstrom | 47a0d5a | 2011-10-12 21:20:05 -0700 | [diff] [blame] | 145 | .PHONY: test-art-gtest |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 146 | test-art-gtest: test-art-host-gtest test-art-target-gtest |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 147 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 148 | |
Brian Carlstrom | 08981ab | 2012-05-25 18:40:15 -0700 | [diff] [blame] | 149 | .PHONY: test-art-run-test |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 150 | test-art-run-test: test-art-host-run-test test-art-target-run-test |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 151 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | 08981ab | 2012-05-25 18:40:15 -0700 | [diff] [blame] | 152 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 153 | ######################################################################## |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 154 | # host test rules |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 155 | |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 156 | VIXL_TEST_DEPENDENCY := |
| 157 | # We can only run the vixl tests on 64-bit hosts (vixl testing issue) when its a |
| 158 | # top-level build (to declare the vixl test rule). |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 159 | ifneq ($(HOST_PREFER_32_BIT),true) |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 160 | ifeq ($(ONE_SHOT_MAKEFILE),) |
| 161 | VIXL_TEST_DEPENDENCY := run-vixl-tests |
Andreas Gampe | 3c03357 | 2014-05-13 08:41:48 -0700 | [diff] [blame] | 162 | endif |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 163 | endif |
| 164 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 165 | .PHONY: test-art-host-vixl |
Ian Rogers | 7a4c1c1 | 2014-05-18 13:03:52 -0700 | [diff] [blame] | 166 | test-art-host-vixl: $(VIXL_TEST_DEPENDENCY) |
Andreas Gampe | 3c03357 | 2014-05-13 08:41:48 -0700 | [diff] [blame] | 167 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 168 | # "mm test-art-host" to build and run all host tests. |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 169 | .PHONY: test-art-host |
Aart Bik | a59032f | 2015-07-06 17:45:30 -0700 | [diff] [blame] | 170 | test-art-host: test-art-host-gtest test-art-host-run-test \ |
| 171 | test-art-host-vixl test-art-host-dexdump |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 172 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | 59848da | 2011-07-23 20:35:19 -0700 | [diff] [blame] | 173 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 174 | # All host tests that run solely with the default compiler. |
| 175 | .PHONY: test-art-host-default |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 176 | test-art-host-default: test-art-host-run-test-default |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 177 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 178 | |
| 179 | # All host tests that run solely with the optimizing compiler. |
| 180 | .PHONY: test-art-host-optimizing |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 181 | test-art-host-optimizing: test-art-host-run-test-optimizing |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 182 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 183 | |
| 184 | # All host tests that run solely on the interpreter. |
Ian Rogers | 85d9ba6 | 2013-01-16 22:32:12 -0800 | [diff] [blame] | 185 | .PHONY: test-art-host-interpreter |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 186 | test-art-host-interpreter: test-art-host-run-test-interpreter |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 187 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Ian Rogers | 85d9ba6 | 2013-01-16 22:32:12 -0800 | [diff] [blame] | 188 | |
Mathieu Chartier | 3fc1b12 | 2015-02-26 10:58:08 -0800 | [diff] [blame] | 189 | # All host tests that run solely on the jit. |
| 190 | .PHONY: test-art-host-jit |
| 191 | test-art-host-jit: test-art-host-run-test-jit |
| 192 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 193 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 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) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 197 | test-art-host-run-test$(ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 198 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | b0aa9d3 | 2012-04-07 23:12:22 -0700 | [diff] [blame] | 199 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 200 | .PHONY: test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 201 | test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 202 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 203 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 204 | .PHONY: test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 205 | test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 206 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | b279337 | 2012-03-17 18:27:16 -0700 | [diff] [blame] | 207 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 208 | .PHONY: test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 209 | test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 210 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 211 | |
Mathieu Chartier | 3fc1b12 | 2015-02-26 10:58:08 -0800 | [diff] [blame] | 212 | .PHONY: test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX) |
| 213 | test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(ART_PHONY_TEST_HOST_SUFFIX) |
| 214 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 215 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 216 | # Secondary host architecture variants: |
| 217 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 218 | .PHONY: test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
| 219 | test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(2ND_ART_PHONY_TEST_HOST_SUFFIX) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 220 | test-art-host-run-test$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 221 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Brian Carlstrom | dbaa93a | 2013-07-31 15:13:10 -0700 | [diff] [blame] | 222 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 223 | .PHONY: test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 224 | test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 225 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Elliott Hughes | 5511f21 | 2011-08-12 18:07:45 -0700 | [diff] [blame] | 226 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 227 | .PHONY: test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 228 | test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 229 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Nicolas Geoffray | 3a50522 | 2014-05-26 16:40:55 +0100 | [diff] [blame] | 230 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 231 | .PHONY: test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 232 | test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 233 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Mathieu Chartier | 3fc1b12 | 2015-02-26 10:58:08 -0800 | [diff] [blame] | 234 | |
| 235 | .PHONY: test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
| 236 | test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
| 237 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 238 | endif |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 239 | |
Aart Bik | 3e40f4a | 2015-07-07 17:09:41 -0700 | [diff] [blame] | 240 | # Dexdump/list regression test. |
Aart Bik | a59032f | 2015-07-06 17:45:30 -0700 | [diff] [blame] | 241 | .PHONY: test-art-host-dexdump |
David Sehr | 4f215d1 | 2019-04-03 09:28:21 -0700 | [diff] [blame] | 242 | test-art-host-dexdump: $(addprefix $(HOST_OUT_EXECUTABLES)/, dexdump dexlist) |
Ying Wang | 882a4f3 | 2015-07-08 14:09:10 -0700 | [diff] [blame] | 243 | ANDROID_HOST_OUT=$(realpath $(HOST_OUT)) art/test/dexdump/run-all-tests |
Aart Bik | a59032f | 2015-07-06 17:45:30 -0700 | [diff] [blame] | 244 | |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 245 | ######################################################################## |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 246 | # target test rules |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 247 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 248 | # "mm test-art-target" to build and run all target tests. |
| 249 | .PHONY: test-art-target |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 250 | test-art-target: test-art-target-gtest test-art-target-run-test |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 251 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 252 | |
| 253 | # All target tests that run solely with the default compiler. |
| 254 | .PHONY: test-art-target-default |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 255 | test-art-target-default: test-art-target-run-test-default |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 256 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 257 | |
| 258 | # All target tests that run solely with the optimizing compiler. |
| 259 | .PHONY: test-art-target-optimizing |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 260 | test-art-target-optimizing: test-art-target-run-test-optimizing |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 261 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 262 | |
| 263 | # All target tests that run solely on the interpreter. |
| 264 | .PHONY: test-art-target-interpreter |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 265 | test-art-target-interpreter: test-art-target-run-test-interpreter |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 266 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 267 | |
Mathieu Chartier | 721f3a8 | 2015-02-27 10:39:48 -0800 | [diff] [blame] | 268 | # All target tests that run solely on the jit. |
| 269 | .PHONY: test-art-target-jit |
| 270 | test-art-target-jit: test-art-target-run-test-jit |
| 271 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 272 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 273 | # Primary target architecture variants: |
| 274 | .PHONY: test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX) |
| 275 | test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(ART_PHONY_TEST_TARGET_SUFFIX) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 276 | test-art-target-run-test$(ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 277 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 278 | |
| 279 | .PHONY: test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 280 | test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 281 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 282 | |
| 283 | .PHONY: test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 284 | test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 285 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 286 | |
| 287 | .PHONY: test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 288 | test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 289 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 290 | |
Mathieu Chartier | 721f3a8 | 2015-02-27 10:39:48 -0800 | [diff] [blame] | 291 | .PHONY: test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX) |
| 292 | test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(ART_PHONY_TEST_TARGET_SUFFIX) |
| 293 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 294 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 295 | # Secondary target architecture variants: |
Dan Willemsen | 5d2dbf8 | 2018-04-11 12:31:11 -0700 | [diff] [blame] | 296 | ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 297 | .PHONY: test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
| 298 | test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 299 | test-art-target-run-test$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 300 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 301 | |
| 302 | .PHONY: test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 303 | test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 304 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 305 | |
| 306 | .PHONY: test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 307 | test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 308 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
| 309 | |
| 310 | .PHONY: test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 311 | test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 312 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Mathieu Chartier | 721f3a8 | 2015-02-27 10:39:48 -0800 | [diff] [blame] | 313 | |
| 314 | .PHONY: test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
| 315 | test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
| 316 | $(hide) $(call ART_TEST_PREREQ_FINISHED,$@) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 317 | endif |
| 318 | |
Dan Willemsen | cd8a057 | 2016-09-16 17:11:36 -0700 | [diff] [blame] | 319 | |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 320 | ####################### |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 321 | # Android Runtime APEX. |
| 322 | |
| 323 | include $(CLEAR_VARS) |
Roland Levillain | e56607a | 2018-11-16 19:40:25 +0000 | [diff] [blame] | 324 | |
| 325 | # The Android Runtime APEX comes in two flavors: |
| 326 | # - the release module (`com.android.runtime.release`), containing |
| 327 | # only "release" artifacts; |
| 328 | # - the debug module (`com.android.runtime.debug`), containing both |
| 329 | # "release" and "debug" artifacts, as well as additional tools. |
| 330 | # |
| 331 | # The Android Runtime APEX module (`com.android.runtime`) is an |
| 332 | # "alias" for one of the previous modules. By default, "user" build |
| 333 | # variants contain the release module, while "userdebug" and "eng" |
| 334 | # build variant contain the debug module. However, if |
| 335 | # `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is defined, it overrides |
| 336 | # the previous logic: |
| 337 | # - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `false`, the |
| 338 | # build will include the release module (whatever the build |
| 339 | # variant); |
| 340 | # - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `true`, the |
| 341 | # build will include the debug module (whatever the build variant). |
| 342 | |
| 343 | art_target_include_debug_build := $(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD) |
| 344 | ifneq (false,$(art_target_include_debug_build)) |
| 345 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 346 | art_target_include_debug_build := true |
| 347 | endif |
| 348 | endif |
| 349 | ifeq (true,$(art_target_include_debug_build)) |
| 350 | # Module with both release and debug variants, as well as |
| 351 | # additional tools. |
| 352 | TARGET_RUNTIME_APEX := com.android.runtime.debug |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 353 | APEX_TEST_MODULE := art-check-debug-apex-gen-fakebin |
Roland Levillain | e56607a | 2018-11-16 19:40:25 +0000 | [diff] [blame] | 354 | else |
| 355 | # Release module (without debug variants nor tools). |
| 356 | TARGET_RUNTIME_APEX := com.android.runtime.release |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 357 | APEX_TEST_MODULE := art-check-release-apex-gen-fakebin |
Roland Levillain | e56607a | 2018-11-16 19:40:25 +0000 | [diff] [blame] | 358 | endif |
| 359 | |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 360 | LOCAL_MODULE := com.android.runtime |
Andreas Gampe | f36079a | 2019-01-29 21:36:22 +0000 | [diff] [blame] | 361 | LOCAL_REQUIRED_MODULES := $(TARGET_RUNTIME_APEX) |
Andreas Gampe | 5797568 | 2019-03-04 09:27:11 -0800 | [diff] [blame] | 362 | LOCAL_REQUIRED_MODULES += art_apex_boot_integrity |
Roland Levillain | e56607a | 2018-11-16 19:40:25 +0000 | [diff] [blame] | 363 | |
| 364 | # Clear locally used variable. |
| 365 | art_target_include_debug_build := |
| 366 | |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 367 | include $(BUILD_PHONY_PACKAGE) |
| 368 | |
Dan Willemsen | b9a05b0 | 2019-04-02 16:13:14 -0700 | [diff] [blame] | 369 | include $(CLEAR_VARS) |
| 370 | LOCAL_MODULE := com.android.runtime |
| 371 | LOCAL_IS_HOST_MODULE := true |
| 372 | ifneq ($(HOST_OS),darwin) |
| 373 | LOCAL_REQUIRED_MODULES += $(APEX_TEST_MODULE) |
| 374 | endif |
| 375 | include $(BUILD_PHONY_PACKAGE) |
| 376 | |
Jiyong Park | 72da985 | 2019-03-21 15:01:11 +0900 | [diff] [blame] | 377 | # Create canonical name -> file name symlink in the symbol directory |
| 378 | # The symbol files for the debug or release variant are installed to |
| 379 | # $(TARGET_OUT_UNSTRIPPED)/$(TARGET_RUNTIME_APEX) directory. However, |
| 380 | # since they are available via /apex/com.android.runtime at runtime |
| 381 | # regardless of which variant is installed, create a symlink so that |
| 382 | # $(TARGET_OUT_UNSTRIPPED)/apex/com.android.runtime is linked to |
| 383 | # $(TARGET_OUT_UNSTRIPPED)/apex/$(TARGET_RUNTIME_APEX). |
| 384 | # Note that installation of the symlink is triggered by the apex_manifest.json |
| 385 | # file which is the file that is guaranteed to be created regardless of the |
| 386 | # value of TARGET_FLATTEN_APEX. |
Jiyong Park | 2708504 | 2019-05-10 21:11:07 +0900 | [diff] [blame] | 387 | # |
| 388 | # b/132413565: Also, when TARGET_FLATTEN_APEX, an empty directory |
| 389 | # /system/apex/com.android.runtime is created. After the entire |
| 390 | # /system/apex is mounted on /apex, the flattened runtime APEX |
| 391 | # (either com.android.runtime.debug or *.release) is mounted on the empty |
| 392 | # directory so that the APEX is accessible via the canonical path |
| 393 | # /apex/com.android.runtime |
Jiyong Park | 72da985 | 2019-03-21 15:01:11 +0900 | [diff] [blame] | 394 | ifeq ($(TARGET_FLATTEN_APEX),true) |
| 395 | runtime_apex_manifest_file := $(PRODUCT_OUT)/system/apex/$(TARGET_RUNTIME_APEX)/apex_manifest.json |
| 396 | else |
| 397 | runtime_apex_manifest_file := $(PRODUCT_OUT)/apex/$(TARGET_RUNTIME_APEX)/apex_manifest.json |
| 398 | endif |
| 399 | |
Jiyong Park | 055cf9a | 2019-04-30 13:11:11 +0900 | [diff] [blame] | 400 | runtime_apex_symlink_timestamp := $(call intermediates-dir-for,FAKE,com.android.runtime)/symlink.timestamp |
| 401 | $(runtime_apex_manifest_file): $(runtime_apex_symlink_timestamp) |
| 402 | $(runtime_apex_manifest_file): PRIVATE_LINK_NAME := $(TARGET_OUT_UNSTRIPPED)/apex/com.android.runtime |
| 403 | $(runtime_apex_symlink_timestamp): |
| 404 | $(hide) mkdir -p $(dir $(PRIVATE_LINK_NAME)) |
| 405 | $(hide) ln -sf $(TARGET_RUNTIME_APEX) $(PRIVATE_LINK_NAME) |
Jiyong Park | 2708504 | 2019-05-10 21:11:07 +0900 | [diff] [blame] | 406 | ifeq ($(TARGET_FLATTEN_APEX),true) |
| 407 | $(hide) mkdir -p $(TARGET_OUT)/apex/com.android.runtime |
| 408 | endif |
Jiyong Park | 055cf9a | 2019-04-30 13:11:11 +0900 | [diff] [blame] | 409 | $(hide) touch $@ |
Jiyong Park | 72da985 | 2019-03-21 15:01:11 +0900 | [diff] [blame] | 410 | |
| 411 | runtime_apex_manifest_file := |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 412 | |
| 413 | ####################### |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 414 | # Fake packages for ART |
| 415 | |
| 416 | # The art-runtime package depends on the core ART libraries and binaries. It exists so we can |
| 417 | # manipulate the set of things shipped, e.g., add debug versions and so on. |
| 418 | |
| 419 | include $(CLEAR_VARS) |
| 420 | LOCAL_MODULE := art-runtime |
| 421 | |
| 422 | # Base requirements. |
| 423 | LOCAL_REQUIRED_MODULES := \ |
| 424 | dalvikvm \ |
| 425 | dex2oat \ |
| 426 | dexoptanalyzer \ |
| 427 | libart \ |
| 428 | libart-compiler \ |
| 429 | libopenjdkjvm \ |
| 430 | libopenjdkjvmti \ |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 431 | profman \ |
Alex Light | fbf9670 | 2017-12-14 13:27:13 -0800 | [diff] [blame] | 432 | libadbconnection \ |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 433 | |
Andreas Gampe | b494903 | 2017-06-22 15:24:41 -0700 | [diff] [blame] | 434 | # Potentially add in debug variants: |
| 435 | # |
| 436 | # * We will never add them if PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD = false. |
| 437 | # * We will always add them if PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD = true. |
| 438 | # * Otherwise, we will add them by default to userdebug and eng builds. |
Andreas Gampe | 5ed27bc | 2017-07-06 15:43:12 -0700 | [diff] [blame] | 439 | art_target_include_debug_build := $(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD) |
| 440 | ifneq (false,$(art_target_include_debug_build)) |
| 441 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 442 | art_target_include_debug_build := true |
Andreas Gampe | b494903 | 2017-06-22 15:24:41 -0700 | [diff] [blame] | 443 | endif |
Andreas Gampe | 5ed27bc | 2017-07-06 15:43:12 -0700 | [diff] [blame] | 444 | ifeq (true,$(art_target_include_debug_build)) |
Andreas Gampe | b494903 | 2017-06-22 15:24:41 -0700 | [diff] [blame] | 445 | LOCAL_REQUIRED_MODULES += \ |
Andreas Gampe | 3d14d2b | 2017-07-18 08:36:16 -0700 | [diff] [blame] | 446 | dex2oatd \ |
| 447 | dexoptanalyzerd \ |
Andreas Gampe | b494903 | 2017-06-22 15:24:41 -0700 | [diff] [blame] | 448 | libartd \ |
| 449 | libartd-compiler \ |
Andreas Gampe | b8c7f1a | 2017-07-12 12:59:50 -0700 | [diff] [blame] | 450 | libopenjdkd \ |
Andreas Gampe | b494903 | 2017-06-22 15:24:41 -0700 | [diff] [blame] | 451 | libopenjdkjvmd \ |
| 452 | libopenjdkjvmtid \ |
Andreas Gampe | 3d14d2b | 2017-07-18 08:36:16 -0700 | [diff] [blame] | 453 | profmand \ |
Alex Light | fbf9670 | 2017-12-14 13:27:13 -0800 | [diff] [blame] | 454 | libadbconnectiond \ |
Andreas Gampe | b494903 | 2017-06-22 15:24:41 -0700 | [diff] [blame] | 455 | |
| 456 | endif |
| 457 | endif |
| 458 | |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 459 | include $(BUILD_PHONY_PACKAGE) |
| 460 | |
Orion Hodson | 5cb98a9 | 2019-03-25 15:07:16 +0000 | [diff] [blame] | 461 | # The art-tools package depends on helpers and tools that are useful for developers. Similar |
| 462 | # dependencies exist for the APEX builds for these tools (see build/apex/Android.bp). |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 463 | |
| 464 | include $(CLEAR_VARS) |
| 465 | LOCAL_MODULE := art-tools |
Orion Hodson | 362e9f2 | 2019-03-28 09:30:20 +0000 | [diff] [blame] | 466 | LOCAL_IS_HOST_MODULE := true |
| 467 | LOCAL_REQUIRED_MODULES := \ |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 468 | ahat \ |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 469 | dexdump \ |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 470 | hprof-conv \ |
Orion Hodson | dfad9fc | 2019-03-26 11:34:21 +0000 | [diff] [blame] | 471 | |
| 472 | # A subset of the tools are disabled when HOST_PREFER_32_BIT is defined as make reports that |
| 473 | # they are not supported on host (b/129323791). This is likely due to art_apex disabling host |
| 474 | # APEX builds when HOST_PREFER_32_BIT is set (b/120617876). |
| 475 | ifneq ($(HOST_PREFER_32_BIT),true) |
Orion Hodson | 362e9f2 | 2019-03-28 09:30:20 +0000 | [diff] [blame] | 476 | LOCAL_REQUIRED_MODULES += \ |
Orion Hodson | dfad9fc | 2019-03-26 11:34:21 +0000 | [diff] [blame] | 477 | dexdiag \ |
| 478 | dexlist \ |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 479 | oatdump \ |
| 480 | |
Orion Hodson | dfad9fc | 2019-03-26 11:34:21 +0000 | [diff] [blame] | 481 | endif |
| 482 | |
Andreas Gampe | 760a58f | 2017-06-22 15:21:09 -0700 | [diff] [blame] | 483 | include $(BUILD_PHONY_PACKAGE) |
| 484 | |
Andreas Gampe | 10edbb1 | 2016-01-06 17:59:49 -0800 | [diff] [blame] | 485 | #################################################################################################### |
| 486 | # Fake packages to ensure generation of libopenjdkd when one builds with mm/mmm/mmma. |
| 487 | # |
| 488 | # The library is required for starting a runtime in debug mode, but libartd does not depend on it |
| 489 | # (dependency cycle otherwise). |
| 490 | # |
| 491 | # Note: * As the package is phony to create a dependency the package name is irrelevant. |
| 492 | # * We make MULTILIB explicit to "both," just to state here that we want both libraries on |
| 493 | # 64-bit systems, even if it is the default. |
| 494 | |
| 495 | # ART on the host. |
| 496 | ifeq ($(ART_BUILD_HOST_DEBUG),true) |
| 497 | include $(CLEAR_VARS) |
| 498 | LOCAL_MODULE := art-libartd-libopenjdkd-host-dependency |
| 499 | LOCAL_MULTILIB := both |
| 500 | LOCAL_REQUIRED_MODULES := libopenjdkd |
| 501 | LOCAL_IS_HOST_MODULE := true |
| 502 | include $(BUILD_PHONY_PACKAGE) |
| 503 | endif |
| 504 | |
| 505 | # ART on the target. |
| 506 | ifeq ($(ART_BUILD_TARGET_DEBUG),true) |
| 507 | include $(CLEAR_VARS) |
| 508 | LOCAL_MODULE := art-libartd-libopenjdkd-target-dependency |
| 509 | LOCAL_MULTILIB := both |
| 510 | LOCAL_REQUIRED_MODULES := libopenjdkd |
| 511 | include $(BUILD_PHONY_PACKAGE) |
| 512 | endif |
| 513 | |
Brian Carlstrom | 76aa0c0 | 2011-10-11 15:29:43 -0700 | [diff] [blame] | 514 | ######################################################################## |
Brian Carlstrom | fa50baa | 2013-08-02 01:00:27 -0700 | [diff] [blame] | 515 | # "m build-art" for quick minimal build |
| 516 | .PHONY: build-art |
| 517 | build-art: build-art-host build-art-target |
| 518 | |
| 519 | .PHONY: build-art-host |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 520 | build-art-host: $(HOST_OUT_EXECUTABLES)/art $(ART_HOST_DEPENDENCIES) $(HOST_CORE_IMG_OUTS) |
Brian Carlstrom | fa50baa | 2013-08-02 01:00:27 -0700 | [diff] [blame] | 521 | |
| 522 | .PHONY: build-art-target |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 523 | build-art-target: $(TARGET_OUT_EXECUTABLES)/art $(ART_TARGET_DEPENDENCIES) $(TARGET_CORE_IMG_OUTS) |
Nicolas Geoffray | 9583fbc | 2014-02-28 15:21:07 +0000 | [diff] [blame] | 524 | |
| 525 | ######################################################################## |
Nicolas Geoffray | 3c8e28a | 2019-01-31 15:22:10 +0000 | [diff] [blame] | 526 | # Workaround for not using symbolic links for linker and bionic libraries |
| 527 | # in a minimal setup (eg buildbot or golem). |
| 528 | ######################################################################## |
| 529 | |
| 530 | PRIVATE_BIONIC_FILES := \ |
| 531 | bin/bootstrap/linker \ |
| 532 | bin/bootstrap/linker64 \ |
| 533 | lib/bootstrap/libc.so \ |
| 534 | lib/bootstrap/libm.so \ |
| 535 | lib/bootstrap/libdl.so \ |
| 536 | lib64/bootstrap/libc.so \ |
| 537 | lib64/bootstrap/libm.so \ |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 538 | lib64/bootstrap/libdl.so \ |
Nicolas Geoffray | 3c8e28a | 2019-01-31 15:22:10 +0000 | [diff] [blame] | 539 | |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 540 | PRIVATE_RUNTIME_DEPENDENCY_LIBS := \ |
| 541 | lib/libnativebridge.so \ |
| 542 | lib64/libnativebridge.so \ |
| 543 | lib/libnativehelper.so \ |
| 544 | lib64/libnativehelper.so \ |
| 545 | lib/libdexfile_external.so \ |
| 546 | lib64/libdexfile_external.so \ |
Nicolas Geoffray | 9dc44d9 | 2019-05-02 09:56:46 +0100 | [diff] [blame] | 547 | lib/libdexfiled_external.so \ |
| 548 | lib64/libdexfiled_external.so \ |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 549 | lib/libnativeloader.so \ |
| 550 | lib64/libnativeloader.so \ |
Roland Levillain | 95e0303 | 2019-03-26 17:00:28 +0000 | [diff] [blame] | 551 | lib/libandroidio.so \ |
| 552 | lib64/libandroidio.so \ |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 553 | |
Roland Levillain | c088b2e | 2019-04-02 18:18:16 +0100 | [diff] [blame] | 554 | # Copy some libraries into `$(TARGET_OUT)/lib(64)` (the |
| 555 | # `/system/lib(64)` directory to be sync'd to the target) for ART testing |
| 556 | # purposes: |
| 557 | # - Bionic bootstrap libraries, copied from |
| 558 | # `$(TARGET_OUT)/lib(64)/bootstrap` (the `/system/lib(64)/bootstrap` |
| 559 | # directory to be sync'd to the target); |
| 560 | # - Some libraries which are part of the Runtime APEX; if the product |
| 561 | # to build uses flattened APEXes, these libraries are copied from |
| 562 | # `$(TARGET_OUT)/apex/com.android.runtime.debug` (the flattened |
| 563 | # (Debug) Runtime APEX directory to be sync'd to the target); |
| 564 | # otherwise, they are copied from |
| 565 | # `$(TARGET_OUT)/../apex/com.android.runtime.debug` (the local |
| 566 | # directory under the build tree containing the (Debug) Runtime APEX |
| 567 | # artifacts, which is not sync'd to the target). |
| 568 | # |
Roland Levillain | d801a7b | 2019-05-01 14:59:00 +0100 | [diff] [blame] | 569 | # TODO(b/121117762, b/129332183): Remove this when the ART Buildbot |
| 570 | # and Golem have full support for the Runtime APEX. |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 571 | .PHONY: standalone-apex-files |
| 572 | standalone-apex-files: libc.bootstrap libdl.bootstrap libm.bootstrap linker com.android.runtime.debug |
Nicolas Geoffray | 3c8e28a | 2019-01-31 15:22:10 +0000 | [diff] [blame] | 573 | for f in $(PRIVATE_BIONIC_FILES); do \ |
| 574 | tf=$(TARGET_OUT)/$$f; \ |
| 575 | if [ -f $$tf ]; then cp -f $$tf $$(echo $$tf | sed 's,bootstrap/,,'); fi; \ |
| 576 | done |
Roland Levillain | c088b2e | 2019-04-02 18:18:16 +0100 | [diff] [blame] | 577 | if [ "x$(TARGET_FLATTEN_APEX)" = xtrue ]; then \ |
| 578 | runtime_apex_orig_dir=$(TARGET_OUT)/apex/com.android.runtime.debug; \ |
| 579 | else \ |
| 580 | runtime_apex_orig_dir=$(TARGET_OUT)/../apex/com.android.runtime.debug; \ |
| 581 | fi; \ |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 582 | for f in $(PRIVATE_RUNTIME_DEPENDENCY_LIBS); do \ |
Roland Levillain | c088b2e | 2019-04-02 18:18:16 +0100 | [diff] [blame] | 583 | tf="$$runtime_apex_orig_dir/$$f"; \ |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 584 | if [ -f $$tf ]; then cp -f $$tf $(TARGET_OUT)/$$f; fi; \ |
| 585 | done |
Nicolas Geoffray | 3c8e28a | 2019-01-31 15:22:10 +0000 | [diff] [blame] | 586 | |
| 587 | ######################################################################## |
Nicolas Geoffray | 5213b6c | 2017-08-14 13:32:15 +0100 | [diff] [blame] | 588 | # Phony target for only building what go/lem requires for pushing ART on /data. |
Nicolas Geoffray | ab4825d | 2018-02-05 16:12:52 +0000 | [diff] [blame] | 589 | |
Nicolas Geoffray | c2a58f3 | 2016-09-16 12:28:12 +0100 | [diff] [blame] | 590 | .PHONY: build-art-target-golem |
Igor Murashkin | 017efa8 | 2016-09-22 15:46:29 -0700 | [diff] [blame] | 591 | # Also include libartbenchmark, we always include it when running golem. |
Nicolas Geoffray | e137a21 | 2016-12-08 13:49:54 +0000 | [diff] [blame] | 592 | # libstdc++ is needed when building for ART_TARGET_LINUX. |
Roland Levillain | d801a7b | 2019-05-01 14:59:00 +0100 | [diff] [blame] | 593 | |
Roland Levillain | 40890c1 | 2019-01-13 22:48:38 +0000 | [diff] [blame] | 594 | # Also include the bootstrap Bionic libraries (libc, libdl, libm). |
| 595 | # These are required as the "main" libc, libdl, and libm have moved to |
| 596 | # the Runtime APEX. This is a temporary change needed until Golem |
| 597 | # fully supports the Runtime APEX. |
Roland Levillain | 40890c1 | 2019-01-13 22:48:38 +0000 | [diff] [blame] | 598 | # |
Roland Levillain | d801a7b | 2019-05-01 14:59:00 +0100 | [diff] [blame] | 599 | # TODO(b/121117762, b/129332183): Remove this when the ART Buildbot |
| 600 | # and Golem have full support for the Runtime APEX. |
| 601 | |
| 602 | # Also include: |
| 603 | # - a copy of the ICU .dat prebuilt files in /system/etc/icu on target |
| 604 | # (see module `icu-data-art-test`); and |
| 605 | # - a copy of the timezones prebuilt files in /system/etc/tz on |
| 606 | # target, (see modules `tzdata-art-test`, `tzlookup.xml-art-test`, |
| 607 | # and `tz_version-art-test`) |
| 608 | # so that they can be found even if the Runtime APEX is not available, |
| 609 | # by setting the environment variable `ART_TEST_ANDROID_RUNTIME_ROOT` |
| 610 | # to "/system" on device. This is a temporary change needed until |
| 611 | # Golem fully supports the Runtime APEX. |
| 612 | # |
| 613 | # TODO(b/121117762, b/129332183): Remove this when the ART Buildbot |
| 614 | # and Golem have full support for the Runtime APEX. |
Igor Murashkin | 017efa8 | 2016-09-22 15:46:29 -0700 | [diff] [blame] | 615 | ART_TARGET_SHARED_LIBRARY_BENCHMARK := $(TARGET_OUT_SHARED_LIBRARIES)/libartbenchmark.so |
Vladimir Marko | a497a39 | 2018-09-26 10:52:50 +0100 | [diff] [blame] | 616 | build-art-target-golem: dex2oat dalvikvm linker libstdc++ \ |
Nicolas Geoffray | 5121691 | 2017-03-16 12:39:50 +0000 | [diff] [blame] | 617 | $(TARGET_OUT_EXECUTABLES)/art \ |
Nicolas Geoffray | c2a58f3 | 2016-09-16 12:28:12 +0100 | [diff] [blame] | 618 | $(TARGET_OUT)/etc/public.libraries.txt \ |
| 619 | $(ART_TARGET_DEX_DEPENDENCIES) \ |
| 620 | $(ART_TARGET_SHARED_LIBRARY_DEPENDENCIES) \ |
Igor Murashkin | 017efa8 | 2016-09-22 15:46:29 -0700 | [diff] [blame] | 621 | $(ART_TARGET_SHARED_LIBRARY_BENCHMARK) \ |
Nicolas Geoffray | c2a58f3 | 2016-09-16 12:28:12 +0100 | [diff] [blame] | 622 | $(TARGET_CORE_IMG_OUT_BASE).art \ |
Roland Levillain | c351281 | 2019-01-11 17:07:49 +0000 | [diff] [blame] | 623 | $(TARGET_CORE_IMG_OUT_BASE)-interpreter.art \ |
Roland Levillain | 40890c1 | 2019-01-13 22:48:38 +0000 | [diff] [blame] | 624 | libc.bootstrap libdl.bootstrap libm.bootstrap \ |
Nicolas Geoffray | 3c8e28a | 2019-01-31 15:22:10 +0000 | [diff] [blame] | 625 | icu-data-art-test \ |
Roland Levillain | d801a7b | 2019-05-01 14:59:00 +0100 | [diff] [blame] | 626 | tzdata-art-test tzlookup.xml-art-test tz_version-art-test \ |
Nicolas Geoffray | 3f285b2 | 2019-02-14 14:08:55 +0000 | [diff] [blame] | 627 | standalone-apex-files |
Nicolas Geoffray | 83b7419 | 2018-04-27 10:58:45 +0100 | [diff] [blame] | 628 | # remove debug libraries from public.libraries.txt because golem builds |
Nicolas Geoffray | 91aac09 | 2018-02-16 10:09:54 +0000 | [diff] [blame] | 629 | # won't have it. |
Nicolas Geoffray | 3bf9429 | 2018-02-04 14:48:34 +0000 | [diff] [blame] | 630 | sed -i '/libartd.so/d' $(TARGET_OUT)/etc/public.libraries.txt |
Nicolas Geoffray | 91aac09 | 2018-02-16 10:09:54 +0000 | [diff] [blame] | 631 | sed -i '/libdexfiled.so/d' $(TARGET_OUT)/etc/public.libraries.txt |
Nicolas Geoffray | 83b7419 | 2018-04-27 10:58:45 +0100 | [diff] [blame] | 632 | sed -i '/libprofiled.so/d' $(TARGET_OUT)/etc/public.libraries.txt |
Nicolas Geoffray | 763a14a | 2018-05-21 13:16:51 +0100 | [diff] [blame] | 633 | sed -i '/libartbased.so/d' $(TARGET_OUT)/etc/public.libraries.txt |
Nicolas Geoffray | c2a58f3 | 2016-09-16 12:28:12 +0100 | [diff] [blame] | 634 | |
| 635 | ######################################################################## |
Igor Murashkin | 017efa8 | 2016-09-22 15:46:29 -0700 | [diff] [blame] | 636 | # Phony target for building what go/lem requires on host. |
| 637 | .PHONY: build-art-host-golem |
| 638 | # Also include libartbenchmark, we always include it when running golem. |
| 639 | ART_HOST_SHARED_LIBRARY_BENCHMARK := $(ART_HOST_OUT_SHARED_LIBRARIES)/libartbenchmark.so |
| 640 | build-art-host-golem: build-art-host \ |
| 641 | $(ART_HOST_SHARED_LIBRARY_BENCHMARK) |
| 642 | |
| 643 | ######################################################################## |
Nicolas Geoffray | 5213b6c | 2017-08-14 13:32:15 +0100 | [diff] [blame] | 644 | # Phony target for building what go/lem requires for syncing /system to target. |
| 645 | .PHONY: build-art-unbundled-golem |
Nicolas Geoffray | cf053a5 | 2017-11-15 15:10:09 +0000 | [diff] [blame] | 646 | build-art-unbundled-golem: art-runtime linker oatdump $(TARGET_CORE_JARS) crash_dump |
Nicolas Geoffray | 5213b6c | 2017-08-14 13:32:15 +0100 | [diff] [blame] | 647 | |
| 648 | ######################################################################## |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 649 | # Rules for building all dependencies for tests. |
| 650 | |
| 651 | .PHONY: build-art-host-tests |
Yohann Roussel | 05b9125 | 2015-12-09 12:02:46 +0100 | [diff] [blame] | 652 | 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) |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 653 | |
| 654 | .PHONY: build-art-target-tests |
Nicolas Geoffray | 375d4eb | 2018-10-12 15:23:56 +0100 | [diff] [blame] | 655 | build-art-target-tests: build-art-target $(TEST_ART_RUN_TEST_DEPENDENCIES) $(ART_TEST_TARGET_RUN_TEST_DEPENDENCIES) $(ART_TEST_TARGET_GTEST_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES) |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 656 | |
| 657 | ######################################################################## |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 658 | # targets to switch back and forth from libdvm to libart |
| 659 | |
| 660 | .PHONY: use-art |
| 661 | use-art: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 662 | $(ADB) root |
| 663 | $(ADB) wait-for-device shell stop |
| 664 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
| 665 | $(ADB) shell start |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 666 | |
| 667 | .PHONY: use-artd |
| 668 | use-artd: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 669 | $(ADB) root |
| 670 | $(ADB) wait-for-device shell stop |
| 671 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libartd.so |
| 672 | $(ADB) shell start |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 673 | |
| 674 | .PHONY: use-dalvik |
| 675 | use-dalvik: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 676 | $(ADB) root |
| 677 | $(ADB) wait-for-device shell stop |
| 678 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libdvm.so |
| 679 | $(ADB) shell start |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 680 | |
| 681 | .PHONY: use-art-full |
| 682 | use-art-full: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 683 | $(ADB) root |
| 684 | $(ADB) wait-for-device shell stop |
| 685 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/* |
| 686 | $(ADB) shell setprop dalvik.vm.dex2oat-filter \"\" |
| 687 | $(ADB) shell setprop dalvik.vm.image-dex2oat-filter \"\" |
| 688 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
| 689 | $(ADB) shell setprop dalvik.vm.usejit false |
| 690 | $(ADB) shell start |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 691 | |
Hiroshi Yamauchi | cb9bccd | 2014-05-19 12:29:36 -0700 | [diff] [blame] | 692 | .PHONY: use-artd-full |
| 693 | use-artd-full: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 694 | $(ADB) root |
| 695 | $(ADB) wait-for-device shell stop |
| 696 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/* |
| 697 | $(ADB) shell setprop dalvik.vm.dex2oat-filter \"\" |
| 698 | $(ADB) shell setprop dalvik.vm.image-dex2oat-filter \"\" |
| 699 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libartd.so |
| 700 | $(ADB) shell setprop dalvik.vm.usejit false |
| 701 | $(ADB) shell start |
Hiroshi Yamauchi | cb9bccd | 2014-05-19 12:29:36 -0700 | [diff] [blame] | 702 | |
Mathieu Chartier | d71795b | 2015-07-14 16:59:23 -0700 | [diff] [blame] | 703 | .PHONY: use-art-jit |
| 704 | use-art-jit: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 705 | $(ADB) root |
| 706 | $(ADB) wait-for-device shell stop |
| 707 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/* |
| 708 | $(ADB) shell setprop dalvik.vm.dex2oat-filter "verify-at-runtime" |
| 709 | $(ADB) shell setprop dalvik.vm.image-dex2oat-filter "verify-at-runtime" |
| 710 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
| 711 | $(ADB) shell setprop dalvik.vm.usejit true |
| 712 | $(ADB) shell start |
Brian Carlstrom | 1e895cd | 2014-03-06 23:17:15 -0800 | [diff] [blame] | 713 | |
| 714 | .PHONY: use-art-interpret-only |
| 715 | use-art-interpret-only: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 716 | $(ADB) root |
| 717 | $(ADB) wait-for-device shell stop |
| 718 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/* |
| 719 | $(ADB) shell setprop dalvik.vm.dex2oat-filter "interpret-only" |
| 720 | $(ADB) shell setprop dalvik.vm.image-dex2oat-filter "interpret-only" |
| 721 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
| 722 | $(ADB) shell setprop dalvik.vm.usejit false |
| 723 | $(ADB) shell start |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 724 | |
Sebastien Hertz | 15582b9 | 2014-07-04 10:53:22 +0200 | [diff] [blame] | 725 | .PHONY: use-artd-interpret-only |
| 726 | use-artd-interpret-only: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 727 | $(ADB) root |
| 728 | $(ADB) wait-for-device shell stop |
| 729 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/* |
| 730 | $(ADB) shell setprop dalvik.vm.dex2oat-filter "interpret-only" |
| 731 | $(ADB) shell setprop dalvik.vm.image-dex2oat-filter "interpret-only" |
| 732 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libartd.so |
| 733 | $(ADB) shell setprop dalvik.vm.usejit false |
| 734 | $(ADB) shell start |
Sebastien Hertz | 15582b9 | 2014-07-04 10:53:22 +0200 | [diff] [blame] | 735 | |
Jeff Hao | 4a200f5 | 2014-04-01 14:58:49 -0700 | [diff] [blame] | 736 | .PHONY: use-art-verify-none |
| 737 | use-art-verify-none: |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 738 | $(ADB) root |
| 739 | $(ADB) wait-for-device shell stop |
| 740 | $(ADB) shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/* |
| 741 | $(ADB) shell setprop dalvik.vm.dex2oat-filter "verify-none" |
| 742 | $(ADB) shell setprop dalvik.vm.image-dex2oat-filter "verify-none" |
| 743 | $(ADB) shell setprop persist.sys.dalvik.vm.lib.2 libart.so |
| 744 | $(ADB) shell setprop dalvik.vm.usejit false |
| 745 | $(ADB) shell start |
Jeff Hao | 4a200f5 | 2014-04-01 14:58:49 -0700 | [diff] [blame] | 746 | |
Brian Carlstrom | a7a60a8 | 2013-06-24 17:41:19 -0700 | [diff] [blame] | 747 | ######################################################################## |
Brian Carlstrom | bc2f3e3 | 2011-09-22 17:16:54 -0700 | [diff] [blame] | 748 | |
Ian Rogers | 8f0bbd2 | 2014-09-26 15:31:20 -0700 | [diff] [blame] | 749 | # Clear locally used variables. |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 750 | TEST_ART_TARGET_SYNC_DEPS := |
Narayan Kamath | 0095d88 | 2016-02-12 16:09:58 +0000 | [diff] [blame] | 751 | |
Andreas Gampe | fad48e7 | 2016-04-11 11:57:18 -0700 | [diff] [blame] | 752 | # Helper target that depends on boot image creation. |
| 753 | # |
| 754 | # Can be used, for example, to dump initialization failures: |
| 755 | # m art-boot-image ART_BOOT_IMAGE_EXTRA_ARGS=--dump-init-failures=fails.txt |
| 756 | .PHONY: art-boot-image |
Nicolas Geoffray | a588086 | 2019-03-21 09:33:37 +0000 | [diff] [blame] | 757 | art-boot-image: $(DEXPREOPT_IMAGE_boot_$(TARGET_ARCH)) |
Calin Juravle | f01de11 | 2016-10-24 12:40:19 +0100 | [diff] [blame] | 758 | |
| 759 | .PHONY: art-job-images |
| 760 | art-job-images: \ |
Nicolas Geoffray | a588086 | 2019-03-21 09:33:37 +0000 | [diff] [blame] | 761 | art-boot-image \ |
Calin Juravle | f01de11 | 2016-10-24 12:40:19 +0100 | [diff] [blame] | 762 | $(2ND_DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) \ |
| 763 | $(HOST_OUT_EXECUTABLES)/dex2oats \ |
| 764 | $(HOST_OUT_EXECUTABLES)/dex2oatds \ |
| 765 | $(HOST_OUT_EXECUTABLES)/profman |