Ian Rogers | afd9acc | 2014-06-17 08:21:54 -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 | |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 17 | ifndef ART_ANDROID_COMMON_PATH_MK |
| 18 | ART_ANDROID_COMMON_PATH_MK := true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 19 | |
| 20 | include art/build/Android.common.mk |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 21 | include art/build/Android.common_build.mk |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 22 | |
| 23 | # Directory used for dalvik-cache on device. |
| 24 | ART_TARGET_DALVIK_CACHE_DIR := /data/dalvik-cache |
| 25 | |
| 26 | # Directory used for gtests on device. |
Andreas Gampe | 1fe5e5c | 2014-07-11 21:14:35 -0700 | [diff] [blame] | 27 | # $(TARGET_OUT_DATA_NATIVE_TESTS) will evaluate to the nativetest directory in the target part on |
| 28 | # the host, so we can strip everything but the directory to find out whether it is "nativetest" or |
| 29 | # "nativetest64." |
| 30 | ART_TARGET_NATIVETEST_DIR := /data/$(notdir $(TARGET_OUT_DATA_NATIVE_TESTS))/art |
| 31 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 32 | ART_TARGET_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art |
| 33 | |
| 34 | # Directory used for oat tests on device. |
| 35 | ART_TARGET_TEST_DIR := /data/art-test |
| 36 | ART_TARGET_TEST_OUT := $(TARGET_OUT_DATA)/art-test |
| 37 | |
Brian Carlstrom | ab00b7a | 2015-06-19 22:05:35 -0700 | [diff] [blame] | 38 | # core.oat location on the device. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 39 | TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$(DEX2OAT_TARGET_ARCH)/core.oat |
| 40 | ifdef TARGET_2ND_ARCH |
| 41 | 2ND_TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core.oat |
| 42 | endif |
| 43 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 44 | CORE_OAT_SUFFIX := .oat |
| 45 | |
Brian Carlstrom | ab00b7a | 2015-06-19 22:05:35 -0700 | [diff] [blame] | 46 | # core.oat locations under the out directory. |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 47 | HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 48 | ifneq ($(HOST_PREFER_32_BIT),true) |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 49 | 2ND_HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 50 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 51 | HOST_CORE_OAT_OUTS := |
| 52 | TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 53 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 54 | 2ND_TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 55 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 56 | TARGET_CORE_OAT_OUTS := |
| 57 | |
| 58 | CORE_IMG_SUFFIX := .art |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 59 | |
Brian Carlstrom | ab00b7a | 2015-06-19 22:05:35 -0700 | [diff] [blame] | 60 | # core.art locations under the out directory. |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 61 | HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 62 | ifneq ($(HOST_PREFER_32_BIT),true) |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 63 | 2ND_HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 64 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 65 | HOST_CORE_IMG_OUTS := |
| 66 | TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 67 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 68 | 2ND_TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 69 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 70 | TARGET_CORE_IMG_OUTS := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 71 | |
| 72 | # Oat location of core.art. |
| 73 | HOST_CORE_IMG_LOCATION := $(HOST_OUT_JAVA_LIBRARIES)/core.art |
| 74 | TARGET_CORE_IMG_LOCATION := $(ART_TARGET_TEST_OUT)/core.art |
| 75 | |
Vladimir Marko | 0ace563 | 2018-12-14 11:11:47 +0000 | [diff] [blame] | 76 | # Modules to compile for core.art. |
Victor Chang | 759845f | 2019-08-06 16:04:36 +0100 | [diff] [blame] | 77 | CORE_IMG_JARS := core-oj core-libart core-icu4j okhttp bouncycastle apache-xml |
Vladimir Marko | 0ace563 | 2018-12-14 11:11:47 +0000 | [diff] [blame] | 78 | HOST_CORE_IMG_JARS := $(addsuffix -hostdex,$(CORE_IMG_JARS)) |
| 79 | TARGET_CORE_IMG_JARS := $(addsuffix -testdex,$(CORE_IMG_JARS)) |
| 80 | HOST_CORE_IMG_DEX_LOCATIONS := $(foreach jar,$(HOST_CORE_IMG_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) |
| 81 | ifeq ($(ART_TEST_ANDROID_ROOT),) |
Nicolas Geoffray | a144c27 | 2019-02-20 12:03:53 +0000 | [diff] [blame] | 82 | TARGET_CORE_IMG_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_IMG_JARS),/$(ART_DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar) |
Vladimir Marko | 0ace563 | 2018-12-14 11:11:47 +0000 | [diff] [blame] | 83 | else |
| 84 | TARGET_CORE_IMG_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_IMG_JARS),$(ART_TEST_ANDROID_ROOT)/$(jar).jar) |
| 85 | endif |
| 86 | HOST_CORE_IMG_DEX_FILES := $(foreach jar,$(HOST_CORE_IMG_JARS), $(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),t,COMMON)/javalib.jar) |
| 87 | TARGET_CORE_IMG_DEX_FILES := $(foreach jar,$(TARGET_CORE_IMG_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar), ,COMMON)/javalib.jar) |
| 88 | |
| 89 | # Jar files for the boot class path for testing. Must start with CORE_IMG_JARS. |
Vladimir Marko | bf68e57 | 2018-12-21 11:45:35 +0000 | [diff] [blame] | 90 | TEST_CORE_JARS := $(CORE_IMG_JARS) conscrypt |
Vladimir Marko | 7a85e70 | 2018-12-03 18:47:23 +0000 | [diff] [blame] | 91 | HOST_TEST_CORE_JARS := $(addsuffix -hostdex,$(TEST_CORE_JARS)) |
| 92 | TARGET_TEST_CORE_JARS := $(addsuffix -testdex,$(TEST_CORE_JARS)) |
| 93 | HOST_CORE_DEX_LOCATIONS := $(foreach jar,$(HOST_TEST_CORE_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) |
Nicolas Geoffray | d895961 | 2015-12-27 15:46:35 +0000 | [diff] [blame] | 94 | ifeq ($(ART_TEST_ANDROID_ROOT),) |
Nicolas Geoffray | a144c27 | 2019-02-20 12:03:53 +0000 | [diff] [blame] | 95 | TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_TEST_CORE_JARS),/$(ART_DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar) |
Nicolas Geoffray | d895961 | 2015-12-27 15:46:35 +0000 | [diff] [blame] | 96 | else |
Vladimir Marko | 7a85e70 | 2018-12-03 18:47:23 +0000 | [diff] [blame] | 97 | TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_TEST_CORE_JARS),$(ART_TEST_ANDROID_ROOT)/framework/$(jar).jar) |
Nicolas Geoffray | d895961 | 2015-12-27 15:46:35 +0000 | [diff] [blame] | 98 | endif |
Vladimir Marko | 7a85e70 | 2018-12-03 18:47:23 +0000 | [diff] [blame] | 99 | HOST_CORE_DEX_FILES := $(foreach jar,$(HOST_TEST_CORE_JARS), $(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),t,COMMON)/javalib.jar) |
| 100 | TARGET_CORE_DEX_FILES := $(foreach jar,$(TARGET_TEST_CORE_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar), ,COMMON)/javalib.jar) |
Sebastien Hertz | 19ac027 | 2015-02-24 17:39:50 +0100 | [diff] [blame] | 101 | |
Vladimir Marko | 7a85e70 | 2018-12-03 18:47:23 +0000 | [diff] [blame] | 102 | ART_HOST_DEX_DEPENDENCIES := $(foreach jar,$(HOST_TEST_CORE_JARS),$(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) |
| 103 | ART_TARGET_DEX_DEPENDENCIES := $(foreach jar,$(TARGET_TEST_CORE_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar) |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 104 | |
Victor Chang | 65ae669 | 2019-10-11 14:17:21 +0100 | [diff] [blame] | 105 | ART_CORE_SHARED_LIBRARIES := libicu_jni libjavacore libopenjdk libopenjdkjvm libopenjdkjvmti |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 106 | ART_CORE_SHARED_DEBUG_LIBRARIES := libopenjdkd libopenjdkjvmd libopenjdkjvmtid |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 107 | ART_HOST_SHARED_LIBRARY_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(ART_HOST_OUT_SHARED_LIBRARIES)/$(lib)$(ART_HOST_SHLIB_EXTENSION)) |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 108 | ART_HOST_SHARED_LIBRARY_DEBUG_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(ART_HOST_OUT_SHARED_LIBRARIES)/$(lib)$(ART_HOST_SHLIB_EXTENSION)) |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 109 | ifdef HOST_2ND_ARCH |
| 110 | ART_HOST_SHARED_LIBRARY_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(2ND_HOST_OUT_SHARED_LIBRARIES)/$(lib).so) |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 111 | ART_HOST_SHARED_LIBRARY_DEBUG_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(2ND_HOST_OUT_SHARED_LIBRARIES)/$(lib).so) |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 112 | endif |
| 113 | |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 114 | # Both the primary and the secondary arches of the libs are built by depending |
| 115 | # on the module name. |
| 116 | ART_DEBUG_TARGET_SHARED_LIBRARY_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(lib).com.android.art.debug) |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 117 | ART_TARGET_SHARED_LIBRARY_DEBUG_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(TARGET_OUT_SHARED_LIBRARIES)/$(lib).so) |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 118 | ifdef TARGET_2ND_ARCH |
Alex Light | 7b497ee | 2017-05-25 09:54:15 -0700 | [diff] [blame] | 119 | ART_TARGET_SHARED_LIBRARY_DEBUG_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(2ND_TARGET_OUT_SHARED_LIBRARIES)/$(lib).so) |
Richard Uhler | c5a0004 | 2016-07-01 13:10:56 -0700 | [diff] [blame] | 120 | endif |
| 121 | |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 122 | ART_CORE_DEBUGGABLE_EXECUTABLES := \ |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 123 | dex2oat \ |
Calin Juravle | 36eb313 | 2017-01-13 16:32:38 -0800 | [diff] [blame] | 124 | dexoptanalyzer \ |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 125 | imgdiag \ |
| 126 | oatdump \ |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 127 | profman \ |
| 128 | |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 129 | ART_CORE_EXECUTABLES := \ |
| 130 | dalvikvm \ |
| 131 | dexlist \ |
| 132 | |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 133 | # Depend on the -target or -host phony targets generated by the build system |
| 134 | # for each module |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 135 | ART_TARGET_EXECUTABLES := |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 136 | ifneq ($(ART_BUILD_TARGET_NDEBUG),false) |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 137 | ART_TARGET_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES) $(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)-target) |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 138 | endif |
| 139 | ifneq ($(ART_BUILD_TARGET_DEBUG),false) |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 140 | ART_TARGET_EXECUTABLES += $(foreach name,$(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)d-target) |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 141 | endif |
| 142 | |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 143 | ART_HOST_EXECUTABLES := |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 144 | ifneq ($(ART_BUILD_HOST_NDEBUG),false) |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 145 | ART_HOST_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES) $(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)-host) |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 146 | endif |
| 147 | ifneq ($(ART_BUILD_HOST_DEBUG),false) |
Colin Cross | 02a7335 | 2016-09-13 16:47:02 -0700 | [diff] [blame] | 148 | ART_HOST_EXECUTABLES += $(foreach name,$(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)d-host) |
Colin Cross | 3196360 | 2016-08-30 16:18:42 -0700 | [diff] [blame] | 149 | endif |
| 150 | |
Martin Stjernholm | 84e5bb9 | 2019-09-05 19:56:46 +0100 | [diff] [blame] | 151 | # Release ART APEX, included by default in "user" builds. |
| 152 | RELEASE_ART_APEX := com.android.art.release |
| 153 | # Debug ART APEX, included by default in "userdebug" and "eng" |
Roland Levillain | 8d5a215 | 2019-07-02 19:40:28 +0100 | [diff] [blame] | 154 | # builds and used in ART device benchmarking. |
Martin Stjernholm | 84e5bb9 | 2019-09-05 19:56:46 +0100 | [diff] [blame] | 155 | DEBUG_ART_APEX := com.android.art.debug |
| 156 | # Testing ART APEX, used in ART device testing. |
| 157 | TESTING_ART_APEX := com.android.art.testing |
Roland Levillain | f0b1de8 | 2019-07-02 19:25:58 +0100 | [diff] [blame] | 158 | |
Orion Hodson | c4d13ae | 2020-01-07 12:46:25 +0000 | [diff] [blame] | 159 | # Conscrypt APEX |
| 160 | CONSCRYPT_APEX := com.android.conscrypt |
| 161 | |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 162 | endif # ART_ANDROID_COMMON_PATH_MK |