blob: 3b273a2202a53719e715ab86048a418c68934a6f [file] [log] [blame]
Brian Carlstrom16192862011-09-12 17:50:06 -07001#
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
Brian Carlstrom27ec9612011-09-19 20:20:38 -070017########################################################################
Brian Carlstrom7ab763c2013-12-09 00:38:02 -080018# Rules to build a smaller "core" image to support core libraries
19# (that is, non-Android frameworks) testing on the host and target
20#
21# The main rules to build the default "boot" image are in
22# build/core/dex_preopt_libart.mk
Brian Carlstrom16192862011-09-12 17:50:06 -070023
Nicolas Geoffray611e1db2014-10-09 17:34:45 +010024include art/build/Android.common_build.mk
Dave Allison70202782013-10-22 17:52:19 -070025
Andreas Gampe4d2ef332015-08-05 09:24:45 -070026LOCAL_DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION :=
Ian Rogersd582fa42014-11-05 23:46:43 -080027ifeq ($(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
Andreas Gampe4d2ef332015-08-05 09:24:45 -070028 LOCAL_DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION := --instruction-set-features=default
29else
30 LOCAL_DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION := --instruction-set-features=$(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
Ian Rogersd582fa42014-11-05 23:46:43 -080031endif
Andreas Gampe4d2ef332015-08-05 09:24:45 -070032LOCAL_$(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION :=
Ian Rogersd582fa42014-11-05 23:46:43 -080033ifeq ($($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
Andreas Gampe4d2ef332015-08-05 09:24:45 -070034 LOCAL_$(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION := --instruction-set-features=default
35else
36 LOCAL_$(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION := --instruction-set-features=$($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
Ian Rogersd582fa42014-11-05 23:46:43 -080037endif
38
Nicolas Geoffray1db132d2014-03-26 10:56:24 +000039# Use dex2oat debug version for better error reporting
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +000040# $(1): compiler - optimizing, interpreter or interpreter-access-checks.
Andreas Gampec23c9c92014-10-28 14:47:25 -070041# $(2): pic/no-pic
42# $(3): 2ND_ or undefined, 2ND_ for 32-bit host builds.
Andreas Gampe088b16e2014-12-03 21:59:27 -080043# $(4): wrapper, e.g., valgrind.
44# $(5): dex2oat suffix, e.g, valgrind requires 32 right now.
Jeff Haodcdc85b2015-12-04 14:06:18 -080045# $(6): multi-image.
Alex Light1ef4ce82014-08-27 11:13:47 -070046# NB depending on HOST_CORE_DEX_LOCATIONS so we are sure to have the dex files in frameworks for
47# run-test --no-image
Ian Rogersafd9acc2014-06-17 08:21:54 -070048define create-core-oat-host-rules
Andreas Gampe63fc30e2014-10-24 21:58:16 -070049 core_compile_options :=
50 core_image_name :=
51 core_oat_name :=
52 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -070053 core_pic_infix :=
Nicolas Geoffraya136ab52014-10-31 10:48:25 +000054 core_dex2oat_dependency := $(DEX2OAT_DEPENDENCY)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070055
56 ifeq ($(1),optimizing)
Nicolas Geoffraya136ab52014-10-31 10:48:25 +000057 core_compile_options += --compiler-backend=Optimizing
Nicolas Geoffrayc13f13a2015-10-06 12:39:17 +010058 core_dex2oat_dependency := $(DEX2OAT)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070059 endif
60 ifeq ($(1),interpreter)
61 core_compile_options += --compiler-filter=interpret-only
62 core_infix := -interpreter
63 endif
Andreas Gampe825570c2015-07-26 10:26:03 -070064 ifeq ($(1),interp-ac)
Igor Murashkin7617abd2015-07-10 18:27:47 -070065 core_compile_options += --compiler-filter=verify-at-runtime --runtime-arg -Xverify:softfail
Andreas Gampe825570c2015-07-26 10:26:03 -070066 core_infix := -interp-ac
Igor Murashkin7617abd2015-07-10 18:27:47 -070067 endif
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +000068 ifneq ($(filter-out interpreter interp-ac optimizing,$(1)),)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070069 #Technically this test is not precise, but hopefully good enough.
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +000070 $$(error found $(1) expected interpreter, interpreter-access-checks, or optimizing)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070071 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -070072
73 ifeq ($(2),pic)
74 core_compile_options += --compile-pic
Andreas Gampec23c9c92014-10-28 14:47:25 -070075 endif
76 ifeq ($(2),no-pic)
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +000077 core_pic_infix := -npic
Andreas Gampec23c9c92014-10-28 14:47:25 -070078 endif
79 ifneq ($(filter-out pic no-pic,$(2)),)
80 # Technically this test is not precise, but hopefully good enough.
81 $$(error found $(2) expected pic or no-pic)
82 endif
83
Jeff Haodcdc85b2015-12-04 14:06:18 -080084 # If $(6) is true, generate a multi-image.
85 ifeq ($(6),true)
86 core_multi_infix := -multi
87 core_multi_param := --multi-image --no-inline-from=core-oj-hostdex.jar
88 core_multi_group := _multi
89 else
90 core_multi_infix :=
91 core_multi_param :=
92 core_multi_group :=
93 endif
94
95 core_image_name := $($(3)HOST_CORE_IMG_OUT_BASE)$$(core_infix)$$(core_pic_infix)$$(core_multi_infix)$(4)$(CORE_IMG_SUFFIX)
96 core_oat_name := $($(3)HOST_CORE_OAT_OUT_BASE)$$(core_infix)$$(core_pic_infix)$$(core_multi_infix)$(4)$(CORE_OAT_SUFFIX)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070097
98 # Using the bitness suffix makes it easier to add as a dependency for the run-test mk.
Andreas Gampec23c9c92014-10-28 14:47:25 -070099 ifeq ($(3),)
Jeff Haodcdc85b2015-12-04 14:06:18 -0800100 $(4)HOST_CORE_IMAGE_$(1)_$(2)$$(core_multi_group)_64 := $$(core_image_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700101 else
Jeff Haodcdc85b2015-12-04 14:06:18 -0800102 $(4)HOST_CORE_IMAGE_$(1)_$(2)$$(core_multi_group)_32 := $$(core_image_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700103 endif
Andreas Gampe088b16e2014-12-03 21:59:27 -0800104 $(4)HOST_CORE_IMG_OUTS += $$(core_image_name)
105 $(4)HOST_CORE_OAT_OUTS += $$(core_oat_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700106
Andreas Gampe088b16e2014-12-03 21:59:27 -0800107 # If we have a wrapper, make the target phony.
108 ifneq ($(4),)
109.PHONY: $$(core_image_name)
110 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700111$$(core_image_name): PRIVATE_CORE_COMPILE_OPTIONS := $$(core_compile_options)
112$$(core_image_name): PRIVATE_CORE_IMG_NAME := $$(core_image_name)
113$$(core_image_name): PRIVATE_CORE_OAT_NAME := $$(core_oat_name)
Jeff Haodcdc85b2015-12-04 14:06:18 -0800114$$(core_image_name): PRIVATE_CORE_MULTI_PARAM := $$(core_multi_param)
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000115$$(core_image_name): $$(HOST_CORE_DEX_LOCATIONS) $$(core_dex2oat_dependency)
Shinichiro Hamajic5d29052015-12-18 15:51:51 +0900116 @echo "host dex2oat: $$@"
Ian Rogersafd9acc2014-06-17 08:21:54 -0700117 @mkdir -p $$(dir $$@)
Andreas Gampe088b16e2014-12-03 21:59:27 -0800118 $$(hide) $(4) $$(DEX2OAT)$(5) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
119 --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700120 --image-classes=$$(PRELOADED_CLASSES) $$(addprefix --dex-file=,$$(HOST_CORE_DEX_FILES)) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700121 $$(addprefix --dex-location=,$$(HOST_CORE_DEX_LOCATIONS)) --oat-file=$$(PRIVATE_CORE_OAT_NAME) \
122 --oat-location=$$(PRIVATE_CORE_OAT_NAME) --image=$$(PRIVATE_CORE_IMG_NAME) \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700123 --base=$$(LIBART_IMG_HOST_BASE_ADDRESS) --instruction-set=$$($(3)ART_HOST_ARCH) \
Andreas Gampe4d2ef332015-08-05 09:24:45 -0700124 $$(LOCAL_$(3)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION) \
Alexey Alexandrovab40c112016-09-19 09:33:49 -0700125 --host --android-root=$$(HOST_OUT) --include-patch-information \
126 --generate-debug-info --generate-build-id \
Jeff Haodcdc85b2015-12-04 14:06:18 -0800127 $$(PRIVATE_CORE_MULTI_PARAM) $$(PRIVATE_CORE_COMPILE_OPTIONS)
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700128
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700129$$(core_oat_name): $$(core_image_name)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700130
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700131 # Clean up locally used variables.
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000132 core_dex2oat_dependency :=
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700133 core_compile_options :=
134 core_image_name :=
135 core_oat_name :=
136 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -0700137 core_pic_infix :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700138endef # create-core-oat-host-rules
139
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +0000140# $(1): compiler - optimizing, interpreter or interpreter-access-checks.
Andreas Gampe088b16e2014-12-03 21:59:27 -0800141# $(2): wrapper.
142# $(3): dex2oat suffix.
Jeff Haodcdc85b2015-12-04 14:06:18 -0800143# $(4): multi-image.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700144define create-core-oat-host-rule-combination
Jeff Haodcdc85b2015-12-04 14:06:18 -0800145 $(call create-core-oat-host-rules,$(1),no-pic,,$(2),$(3),$(4))
146 $(call create-core-oat-host-rules,$(1),pic,,$(2),$(3),$(4))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700147
148 ifneq ($(HOST_PREFER_32_BIT),true)
Jeff Haodcdc85b2015-12-04 14:06:18 -0800149 $(call create-core-oat-host-rules,$(1),no-pic,2ND_,$(2),$(3),$(4))
150 $(call create-core-oat-host-rules,$(1),pic,2ND_,$(2),$(3),$(4))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700151 endif
152endef
153
Jeff Haodcdc85b2015-12-04 14:06:18 -0800154$(eval $(call create-core-oat-host-rule-combination,optimizing,,,false))
155$(eval $(call create-core-oat-host-rule-combination,interpreter,,,false))
156$(eval $(call create-core-oat-host-rule-combination,interp-ac,,,false))
Jeff Haodcdc85b2015-12-04 14:06:18 -0800157$(eval $(call create-core-oat-host-rule-combination,optimizing,,,true))
158$(eval $(call create-core-oat-host-rule-combination,interpreter,,,true))
159$(eval $(call create-core-oat-host-rule-combination,interp-ac,,,true))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700160
Andreas Gampe088b16e2014-12-03 21:59:27 -0800161valgrindHOST_CORE_IMG_OUTS :=
162valgrindHOST_CORE_OAT_OUTS :=
Jeff Haodcdc85b2015-12-04 14:06:18 -0800163$(eval $(call create-core-oat-host-rule-combination,optimizing,valgrind,32,false))
164$(eval $(call create-core-oat-host-rule-combination,interpreter,valgrind,32,false))
165$(eval $(call create-core-oat-host-rule-combination,interp-ac,valgrind,32,false))
Andreas Gampe088b16e2014-12-03 21:59:27 -0800166
167valgrind-test-art-host-dex2oat-host: $(valgrindHOST_CORE_IMG_OUTS)
Brian Carlstrom2b7cdf42011-10-13 11:18:28 -0700168
Jeff Haodcdc85b2015-12-04 14:06:18 -0800169test-art-host-dex2oat-host: $(HOST_CORE_IMG_OUTS)
170
Ian Rogersafd9acc2014-06-17 08:21:54 -0700171define create-core-oat-target-rules
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700172 core_compile_options :=
173 core_image_name :=
174 core_oat_name :=
175 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -0700176 core_pic_infix :=
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000177 core_dex2oat_dependency := $(DEX2OAT_DEPENDENCY)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700178
179 ifeq ($(1),optimizing)
Serban Constantinescu010cf912014-12-04 18:12:21 +0000180 core_compile_options += --compiler-backend=Optimizing
Nicolas Geoffray7701d102015-10-05 09:51:36 +0100181 # With the optimizing compiler, we want to rerun dex2oat whenever there is
182 # a dex2oat change to catch regressions early.
183 core_dex2oat_dependency := $(DEX2OAT)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700184 endif
185 ifeq ($(1),interpreter)
186 core_compile_options += --compiler-filter=interpret-only
187 core_infix := -interpreter
188 endif
Andreas Gampe825570c2015-07-26 10:26:03 -0700189 ifeq ($(1),interp-ac)
Igor Murashkin7617abd2015-07-10 18:27:47 -0700190 core_compile_options += --compiler-filter=verify-at-runtime --runtime-arg -Xverify:softfail
Andreas Gampe825570c2015-07-26 10:26:03 -0700191 core_infix := -interp-ac
Igor Murashkin7617abd2015-07-10 18:27:47 -0700192 endif
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +0000193 ifneq ($(filter-out interpreter interp-ac optimizing,$(1)),)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700194 # Technically this test is not precise, but hopefully good enough.
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +0000195 $$(error found $(1) expected interpreter, interpreter-access-checks, or optimizing)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700196 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700197
198 ifeq ($(2),pic)
199 core_compile_options += --compile-pic
Andreas Gampec23c9c92014-10-28 14:47:25 -0700200 endif
201 ifeq ($(2),no-pic)
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +0000202 core_pic_infix := -npic
Andreas Gampec23c9c92014-10-28 14:47:25 -0700203 endif
204 ifneq ($(filter-out pic no-pic,$(2)),)
205 #Technically this test is not precise, but hopefully good enough.
206 $$(error found $(2) expected pic or no-pic)
207 endif
208
Andreas Gampe088b16e2014-12-03 21:59:27 -0800209 core_image_name := $($(3)TARGET_CORE_IMG_OUT_BASE)$$(core_infix)$$(core_pic_infix)$(4)$(CORE_IMG_SUFFIX)
210 core_oat_name := $($(3)TARGET_CORE_OAT_OUT_BASE)$$(core_infix)$$(core_pic_infix)$(4)$(CORE_OAT_SUFFIX)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700211
212 # Using the bitness suffix makes it easier to add as a dependency for the run-test mk.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700213 ifeq ($(3),)
214 ifdef TARGET_2ND_ARCH
Andreas Gampe088b16e2014-12-03 21:59:27 -0800215 $(4)TARGET_CORE_IMAGE_$(1)_$(2)_64 := $$(core_image_name)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700216 else
Andreas Gampe088b16e2014-12-03 21:59:27 -0800217 $(4)TARGET_CORE_IMAGE_$(1)_$(2)_32 := $$(core_image_name)
Scott Wakelinga7812ae2016-10-17 10:03:36 +0100218 ifdef ART_USE_VIXL_ARM_BACKEND
219 ifeq ($(1),optimizing)
220 # TODO(VIXL): The ARM VIXL backend is still work in progress. Therefore for now we do not
221 # compile the core image with the Optimizing backend when ART_USE_VIXL_ARM_BACKEND is
222 # defined.
223 core_compile_options += --compiler-filter=interpret-only
224 endif
225 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700226 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700227 else
Andreas Gampe088b16e2014-12-03 21:59:27 -0800228 $(4)TARGET_CORE_IMAGE_$(1)_$(2)_32 := $$(core_image_name)
Scott Wakelinga7812ae2016-10-17 10:03:36 +0100229 ifdef ART_USE_VIXL_ARM_BACKEND
230 ifeq ($(1),optimizing)
231 # TODO(VIXL): The ARM VIXL backend is still work in progress. Therefore for now we do not
232 # compile the core image with the Optimizing backend when ART_USE_VIXL_ARM_BACKEND is defined.
233 core_compile_options += --compiler-filter=interpret-only
234 endif
235 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700236 endif
Andreas Gampe088b16e2014-12-03 21:59:27 -0800237 $(4)TARGET_CORE_IMG_OUTS += $$(core_image_name)
238 $(4)TARGET_CORE_OAT_OUTS += $$(core_oat_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700239
Andreas Gampe088b16e2014-12-03 21:59:27 -0800240 # If we have a wrapper, make the target phony.
241 ifneq ($(4),)
242.PHONY: $$(core_image_name)
243 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700244$$(core_image_name): PRIVATE_CORE_COMPILE_OPTIONS := $$(core_compile_options)
245$$(core_image_name): PRIVATE_CORE_IMG_NAME := $$(core_image_name)
246$$(core_image_name): PRIVATE_CORE_OAT_NAME := $$(core_oat_name)
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000247$$(core_image_name): $$(TARGET_CORE_DEX_FILES) $$(core_dex2oat_dependency)
Shinichiro Hamajic5d29052015-12-18 15:51:51 +0900248 @echo "target dex2oat: $$@"
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700249 @mkdir -p $$(dir $$@)
Andreas Gampe088b16e2014-12-03 21:59:27 -0800250 $$(hide) $(4) $$(DEX2OAT)$(5) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
251 --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700252 --image-classes=$$(PRELOADED_CLASSES) $$(addprefix --dex-file=,$$(TARGET_CORE_DEX_FILES)) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700253 $$(addprefix --dex-location=,$$(TARGET_CORE_DEX_LOCATIONS)) --oat-file=$$(PRIVATE_CORE_OAT_NAME) \
254 --oat-location=$$(PRIVATE_CORE_OAT_NAME) --image=$$(PRIVATE_CORE_IMG_NAME) \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700255 --base=$$(LIBART_IMG_TARGET_BASE_ADDRESS) --instruction-set=$$($(3)TARGET_ARCH) \
Douglas Leung3d12ead2015-03-18 11:29:14 -0700256 --instruction-set-variant=$$($(3)DEX2OAT_TARGET_CPU_VARIANT) \
Ian Rogersd582fa42014-11-05 23:46:43 -0800257 --instruction-set-features=$$($(3)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
Alexey Alexandrovab40c112016-09-19 09:33:49 -0700258 --android-root=$$(PRODUCT_OUT)/system --include-patch-information \
259 --generate-debug-info --generate-build-id \
Nicolas Geoffray130bd1b2014-11-03 16:23:48 +0000260 $$(PRIVATE_CORE_COMPILE_OPTIONS) || (rm $$(PRIVATE_CORE_OAT_NAME); exit 1)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700261
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700262$$(core_oat_name): $$(core_image_name)
Andreas Gampe2fe07922014-04-21 07:50:39 -0700263
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700264 # Clean up locally used variables.
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000265 core_dex2oat_dependency :=
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700266 core_compile_options :=
267 core_image_name :=
268 core_oat_name :=
269 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -0700270 core_pic_infix :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700271endef # create-core-oat-target-rules
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700272
Nicolas Geoffrayb76bc782016-09-14 12:33:34 +0000273# $(1): compiler - optimizing, interpreter or interpreter-access-checks.
Andreas Gampe088b16e2014-12-03 21:59:27 -0800274# $(2): wrapper.
275# $(3): dex2oat suffix.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700276define create-core-oat-target-rule-combination
Andreas Gampe088b16e2014-12-03 21:59:27 -0800277 $(call create-core-oat-target-rules,$(1),no-pic,,$(2),$(3))
278 $(call create-core-oat-target-rules,$(1),pic,,$(2),$(3))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700279
280 ifdef TARGET_2ND_ARCH
Andreas Gampe088b16e2014-12-03 21:59:27 -0800281 $(call create-core-oat-target-rules,$(1),no-pic,2ND_,$(2),$(3))
282 $(call create-core-oat-target-rules,$(1),pic,2ND_,$(2),$(3))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700283 endif
284endef
285
Andreas Gampe088b16e2014-12-03 21:59:27 -0800286$(eval $(call create-core-oat-target-rule-combination,optimizing,,))
287$(eval $(call create-core-oat-target-rule-combination,interpreter,,))
Andreas Gampe825570c2015-07-26 10:26:03 -0700288$(eval $(call create-core-oat-target-rule-combination,interp-ac,,))
Andreas Gampe088b16e2014-12-03 21:59:27 -0800289
290valgrindTARGET_CORE_IMG_OUTS :=
291valgrindTARGET_CORE_OAT_OUTS :=
Andreas Gampe088b16e2014-12-03 21:59:27 -0800292$(eval $(call create-core-oat-target-rule-combination,optimizing,valgrind,32))
293$(eval $(call create-core-oat-target-rule-combination,interpreter,valgrind,32))
Andreas Gampe825570c2015-07-26 10:26:03 -0700294$(eval $(call create-core-oat-target-rule-combination,interp-ac,valgrind,32))
Andreas Gampe088b16e2014-12-03 21:59:27 -0800295
296valgrind-test-art-host-dex2oat-target: $(valgrindTARGET_CORE_IMG_OUTS)
297
298valgrind-test-art-host-dex2oat: valgrind-test-art-host-dex2oat-host valgrind-test-art-host-dex2oat-target