blob: 6e17ed38d6827830322f5249c0a730176cab109f [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
Igor Murashkin7617abd2015-07-10 18:27:47 -070040# $(1): compiler - default, optimizing, jit, 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.
Alex Light1ef4ce82014-08-27 11:13:47 -070045# NB depending on HOST_CORE_DEX_LOCATIONS so we are sure to have the dex files in frameworks for
46# run-test --no-image
Ian Rogersafd9acc2014-06-17 08:21:54 -070047define create-core-oat-host-rules
Andreas Gampe63fc30e2014-10-24 21:58:16 -070048 core_compile_options :=
49 core_image_name :=
50 core_oat_name :=
51 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -070052 core_pic_infix :=
Nicolas Geoffraya136ab52014-10-31 10:48:25 +000053 core_dex2oat_dependency := $(DEX2OAT_DEPENDENCY)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070054
Nicolas Geoffray5d672a62014-12-04 14:39:31 +000055 # With the optimizing compiler, we want to rerun dex2oat whenever there is
56 # a dex2oat change to catch regressions early.
57 ifeq ($(ART_USE_OPTIMIZING_COMPILER), true)
58 core_dex2oat_dependency := $(DEX2OAT)
Nicolas Geoffrayc9338b92014-12-03 13:36:10 +000059 endif
Nicolas Geoffray5d672a62014-12-04 14:39:31 +000060
Nicolas Geoffray6427df12014-12-17 12:34:15 +000061 ifeq ($(1),default)
62 core_compile_options += --compiler-backend=Quick
63 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -070064 ifeq ($(1),optimizing)
Nicolas Geoffraya136ab52014-10-31 10:48:25 +000065 core_compile_options += --compiler-backend=Optimizing
Nicolas Geoffraya136ab52014-10-31 10:48:25 +000066 core_dex2oat_dependency := $(DEX2OAT)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070067 core_infix := -optimizing
68 endif
69 ifeq ($(1),interpreter)
70 core_compile_options += --compiler-filter=interpret-only
71 core_infix := -interpreter
72 endif
Andreas Gampe825570c2015-07-26 10:26:03 -070073 ifeq ($(1),interp-ac)
Igor Murashkin7617abd2015-07-10 18:27:47 -070074 core_compile_options += --compiler-filter=verify-at-runtime --runtime-arg -Xverify:softfail
Andreas Gampe825570c2015-07-26 10:26:03 -070075 core_infix := -interp-ac
Igor Murashkin7617abd2015-07-10 18:27:47 -070076 endif
Andreas Gampe8a159fd2015-09-21 15:14:38 -070077 ifeq ($(1),jit)
78 core_compile_options += --compiler-filter=verify-at-runtime
79 core_infix := -jit
80 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -070081 ifeq ($(1),default)
82 # Default has no infix, no compile options.
83 endif
Andreas Gampe825570c2015-07-26 10:26:03 -070084 ifneq ($(filter-out default interpreter interp-ac jit optimizing,$(1)),)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070085 #Technically this test is not precise, but hopefully good enough.
Igor Murashkin7617abd2015-07-10 18:27:47 -070086 $$(error found $(1) expected default, interpreter, interpreter-access-checks, jit or optimizing)
Andreas Gampe63fc30e2014-10-24 21:58:16 -070087 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -070088
89 ifeq ($(2),pic)
90 core_compile_options += --compile-pic
91 core_pic_infix := -pic
92 endif
93 ifeq ($(2),no-pic)
94 # No change for non-pic
95 endif
96 ifneq ($(filter-out pic no-pic,$(2)),)
97 # Technically this test is not precise, but hopefully good enough.
98 $$(error found $(2) expected pic or no-pic)
99 endif
100
Andreas Gampe088b16e2014-12-03 21:59:27 -0800101 core_image_name := $($(3)HOST_CORE_IMG_OUT_BASE)$$(core_infix)$$(core_pic_infix)$(4)$(CORE_IMG_SUFFIX)
102 core_oat_name := $($(3)HOST_CORE_OAT_OUT_BASE)$$(core_infix)$$(core_pic_infix)$(4)$(CORE_OAT_SUFFIX)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700103
104 # Using the bitness suffix makes it easier to add as a dependency for the run-test mk.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700105 ifeq ($(3),)
Andreas Gampe088b16e2014-12-03 21:59:27 -0800106 $(4)HOST_CORE_IMAGE_$(1)_$(2)_64 := $$(core_image_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700107 else
Andreas Gampe088b16e2014-12-03 21:59:27 -0800108 $(4)HOST_CORE_IMAGE_$(1)_$(2)_32 := $$(core_image_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700109 endif
Andreas Gampe088b16e2014-12-03 21:59:27 -0800110 $(4)HOST_CORE_IMG_OUTS += $$(core_image_name)
111 $(4)HOST_CORE_OAT_OUTS += $$(core_oat_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700112
Andreas Gampe088b16e2014-12-03 21:59:27 -0800113 # If we have a wrapper, make the target phony.
114 ifneq ($(4),)
115.PHONY: $$(core_image_name)
116 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700117$$(core_image_name): PRIVATE_CORE_COMPILE_OPTIONS := $$(core_compile_options)
118$$(core_image_name): PRIVATE_CORE_IMG_NAME := $$(core_image_name)
119$$(core_image_name): PRIVATE_CORE_OAT_NAME := $$(core_oat_name)
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000120$$(core_image_name): $$(HOST_CORE_DEX_LOCATIONS) $$(core_dex2oat_dependency)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700121 @echo "host dex2oat: $$@ ($$?)"
122 @mkdir -p $$(dir $$@)
Andreas Gampe088b16e2014-12-03 21:59:27 -0800123 $$(hide) $(4) $$(DEX2OAT)$(5) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
124 --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700125 --image-classes=$$(PRELOADED_CLASSES) $$(addprefix --dex-file=,$$(HOST_CORE_DEX_FILES)) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700126 $$(addprefix --dex-location=,$$(HOST_CORE_DEX_LOCATIONS)) --oat-file=$$(PRIVATE_CORE_OAT_NAME) \
127 --oat-location=$$(PRIVATE_CORE_OAT_NAME) --image=$$(PRIVATE_CORE_IMG_NAME) \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700128 --base=$$(LIBART_IMG_HOST_BASE_ADDRESS) --instruction-set=$$($(3)ART_HOST_ARCH) \
Andreas Gampe4d2ef332015-08-05 09:24:45 -0700129 $$(LOCAL_$(3)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION) \
David Srbecky461d72a2015-06-11 01:27:56 +0100130 --host --android-root=$$(HOST_OUT) --include-patch-information --generate-debug-info \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700131 $$(PRIVATE_CORE_COMPILE_OPTIONS)
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700132
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700133$$(core_oat_name): $$(core_image_name)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700134
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700135 # Clean up locally used variables.
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000136 core_dex2oat_dependency :=
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700137 core_compile_options :=
138 core_image_name :=
139 core_oat_name :=
140 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -0700141 core_pic_infix :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700142endef # create-core-oat-host-rules
143
Igor Murashkin7617abd2015-07-10 18:27:47 -0700144# $(1): compiler - default, optimizing, jit, interpreter or interpreter-access-checks.
Andreas Gampe088b16e2014-12-03 21:59:27 -0800145# $(2): wrapper.
146# $(3): dex2oat suffix.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700147define create-core-oat-host-rule-combination
Andreas Gampe088b16e2014-12-03 21:59:27 -0800148 $(call create-core-oat-host-rules,$(1),no-pic,,$(2),$(3))
149 $(call create-core-oat-host-rules,$(1),pic,,$(2),$(3))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700150
151 ifneq ($(HOST_PREFER_32_BIT),true)
Andreas Gampe088b16e2014-12-03 21:59:27 -0800152 $(call create-core-oat-host-rules,$(1),no-pic,2ND_,$(2),$(3))
153 $(call create-core-oat-host-rules,$(1),pic,2ND_,$(2),$(3))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700154 endif
155endef
156
Andreas Gampe088b16e2014-12-03 21:59:27 -0800157$(eval $(call create-core-oat-host-rule-combination,default,,))
158$(eval $(call create-core-oat-host-rule-combination,optimizing,,))
159$(eval $(call create-core-oat-host-rule-combination,interpreter,,))
Andreas Gampe825570c2015-07-26 10:26:03 -0700160$(eval $(call create-core-oat-host-rule-combination,interp-ac,,))
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700161$(eval $(call create-core-oat-host-rule-combination,jit,,))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700162
Andreas Gampe088b16e2014-12-03 21:59:27 -0800163valgrindHOST_CORE_IMG_OUTS :=
164valgrindHOST_CORE_OAT_OUTS :=
165$(eval $(call create-core-oat-host-rule-combination,default,valgrind,32))
166$(eval $(call create-core-oat-host-rule-combination,optimizing,valgrind,32))
167$(eval $(call create-core-oat-host-rule-combination,interpreter,valgrind,32))
Andreas Gampe825570c2015-07-26 10:26:03 -0700168$(eval $(call create-core-oat-host-rule-combination,interp-ac,valgrind,32))
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700169$(eval $(call create-core-oat-host-rule-combination,jit,valgrind,32))
Andreas Gampe088b16e2014-12-03 21:59:27 -0800170
171valgrind-test-art-host-dex2oat-host: $(valgrindHOST_CORE_IMG_OUTS)
Brian Carlstrom2b7cdf42011-10-13 11:18:28 -0700172
Ian Rogersafd9acc2014-06-17 08:21:54 -0700173define create-core-oat-target-rules
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700174 core_compile_options :=
175 core_image_name :=
176 core_oat_name :=
177 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -0700178 core_pic_infix :=
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000179 core_dex2oat_dependency := $(DEX2OAT_DEPENDENCY)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700180
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000181 # With the optimizing compiler, we want to rerun dex2oat whenever there is
182 # a dex2oat change to catch regressions early.
183 ifeq ($(ART_USE_OPTIMIZING_COMPILER), true)
184 core_dex2oat_dependency := $(DEX2OAT)
Nicolas Geoffrayc9338b92014-12-03 13:36:10 +0000185 endif
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000186
Nicolas Geoffray6427df12014-12-17 12:34:15 +0000187 ifeq ($(1),default)
188 core_compile_options += --compiler-backend=Quick
189 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700190 ifeq ($(1),optimizing)
Serban Constantinescu010cf912014-12-04 18:12:21 +0000191 core_compile_options += --compiler-backend=Optimizing
192 core_dex2oat_dependency := $(DEX2OAT)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700193 core_infix := -optimizing
194 endif
195 ifeq ($(1),interpreter)
196 core_compile_options += --compiler-filter=interpret-only
197 core_infix := -interpreter
198 endif
Andreas Gampe825570c2015-07-26 10:26:03 -0700199 ifeq ($(1),interp-ac)
Igor Murashkin7617abd2015-07-10 18:27:47 -0700200 core_compile_options += --compiler-filter=verify-at-runtime --runtime-arg -Xverify:softfail
Andreas Gampe825570c2015-07-26 10:26:03 -0700201 core_infix := -interp-ac
Igor Murashkin7617abd2015-07-10 18:27:47 -0700202 endif
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700203 ifeq ($(1),jit)
204 core_compile_options += --compiler-filter=verify-at-runtime
205 core_infix := -jit
206 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700207 ifeq ($(1),default)
208 # Default has no infix, no compile options.
209 endif
Andreas Gampe825570c2015-07-26 10:26:03 -0700210 ifneq ($(filter-out default interpreter interp-ac jit optimizing,$(1)),)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700211 # Technically this test is not precise, but hopefully good enough.
Igor Murashkin7617abd2015-07-10 18:27:47 -0700212 $$(error found $(1) expected default, interpreter, interpreter-access-checks, jit or optimizing)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700213 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700214
215 ifeq ($(2),pic)
216 core_compile_options += --compile-pic
217 core_pic_infix := -pic
218 endif
219 ifeq ($(2),no-pic)
220 # No change for non-pic
221 endif
222 ifneq ($(filter-out pic no-pic,$(2)),)
223 #Technically this test is not precise, but hopefully good enough.
224 $$(error found $(2) expected pic or no-pic)
225 endif
226
Andreas Gampe088b16e2014-12-03 21:59:27 -0800227 core_image_name := $($(3)TARGET_CORE_IMG_OUT_BASE)$$(core_infix)$$(core_pic_infix)$(4)$(CORE_IMG_SUFFIX)
228 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 -0700229
230 # Using the bitness suffix makes it easier to add as a dependency for the run-test mk.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700231 ifeq ($(3),)
232 ifdef TARGET_2ND_ARCH
Andreas Gampe088b16e2014-12-03 21:59:27 -0800233 $(4)TARGET_CORE_IMAGE_$(1)_$(2)_64 := $$(core_image_name)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700234 else
Andreas Gampe088b16e2014-12-03 21:59:27 -0800235 $(4)TARGET_CORE_IMAGE_$(1)_$(2)_32 := $$(core_image_name)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700236 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700237 else
Andreas Gampe088b16e2014-12-03 21:59:27 -0800238 $(4)TARGET_CORE_IMAGE_$(1)_$(2)_32 := $$(core_image_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700239 endif
Andreas Gampe088b16e2014-12-03 21:59:27 -0800240 $(4)TARGET_CORE_IMG_OUTS += $$(core_image_name)
241 $(4)TARGET_CORE_OAT_OUTS += $$(core_oat_name)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700242
Andreas Gampe088b16e2014-12-03 21:59:27 -0800243 # If we have a wrapper, make the target phony.
244 ifneq ($(4),)
245.PHONY: $$(core_image_name)
246 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700247$$(core_image_name): PRIVATE_CORE_COMPILE_OPTIONS := $$(core_compile_options)
248$$(core_image_name): PRIVATE_CORE_IMG_NAME := $$(core_image_name)
249$$(core_image_name): PRIVATE_CORE_OAT_NAME := $$(core_oat_name)
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000250$$(core_image_name): $$(TARGET_CORE_DEX_FILES) $$(core_dex2oat_dependency)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700251 @echo "target dex2oat: $$@ ($$?)"
252 @mkdir -p $$(dir $$@)
Andreas Gampe088b16e2014-12-03 21:59:27 -0800253 $$(hide) $(4) $$(DEX2OAT)$(5) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
254 --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700255 --image-classes=$$(PRELOADED_CLASSES) $$(addprefix --dex-file=,$$(TARGET_CORE_DEX_FILES)) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700256 $$(addprefix --dex-location=,$$(TARGET_CORE_DEX_LOCATIONS)) --oat-file=$$(PRIVATE_CORE_OAT_NAME) \
257 --oat-location=$$(PRIVATE_CORE_OAT_NAME) --image=$$(PRIVATE_CORE_IMG_NAME) \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700258 --base=$$(LIBART_IMG_TARGET_BASE_ADDRESS) --instruction-set=$$($(3)TARGET_ARCH) \
Douglas Leung3d12ead2015-03-18 11:29:14 -0700259 --instruction-set-variant=$$($(3)DEX2OAT_TARGET_CPU_VARIANT) \
Ian Rogersd582fa42014-11-05 23:46:43 -0800260 --instruction-set-features=$$($(3)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
David Srbecky461d72a2015-06-11 01:27:56 +0100261 --android-root=$$(PRODUCT_OUT)/system --include-patch-information --generate-debug-info \
Nicolas Geoffray130bd1b2014-11-03 16:23:48 +0000262 $$(PRIVATE_CORE_COMPILE_OPTIONS) || (rm $$(PRIVATE_CORE_OAT_NAME); exit 1)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700263
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700264$$(core_oat_name): $$(core_image_name)
Andreas Gampe2fe07922014-04-21 07:50:39 -0700265
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700266 # Clean up locally used variables.
Nicolas Geoffraya136ab52014-10-31 10:48:25 +0000267 core_dex2oat_dependency :=
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700268 core_compile_options :=
269 core_image_name :=
270 core_oat_name :=
271 core_infix :=
Andreas Gampec23c9c92014-10-28 14:47:25 -0700272 core_pic_infix :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700273endef # create-core-oat-target-rules
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700274
Igor Murashkin7617abd2015-07-10 18:27:47 -0700275# $(1): compiler - default, optimizing, jit, interpreter or interpreter-access-checks.
Andreas Gampe088b16e2014-12-03 21:59:27 -0800276# $(2): wrapper.
277# $(3): dex2oat suffix.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700278define create-core-oat-target-rule-combination
Andreas Gampe088b16e2014-12-03 21:59:27 -0800279 $(call create-core-oat-target-rules,$(1),no-pic,,$(2),$(3))
280 $(call create-core-oat-target-rules,$(1),pic,,$(2),$(3))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700281
282 ifdef TARGET_2ND_ARCH
Andreas Gampe088b16e2014-12-03 21:59:27 -0800283 $(call create-core-oat-target-rules,$(1),no-pic,2ND_,$(2),$(3))
284 $(call create-core-oat-target-rules,$(1),pic,2ND_,$(2),$(3))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700285 endif
286endef
287
Andreas Gampe088b16e2014-12-03 21:59:27 -0800288$(eval $(call create-core-oat-target-rule-combination,default,,))
289$(eval $(call create-core-oat-target-rule-combination,optimizing,,))
290$(eval $(call create-core-oat-target-rule-combination,interpreter,,))
Andreas Gampe825570c2015-07-26 10:26:03 -0700291$(eval $(call create-core-oat-target-rule-combination,interp-ac,,))
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700292$(eval $(call create-core-oat-target-rule-combination,jit,,))
Andreas Gampe088b16e2014-12-03 21:59:27 -0800293
294valgrindTARGET_CORE_IMG_OUTS :=
295valgrindTARGET_CORE_OAT_OUTS :=
296$(eval $(call create-core-oat-target-rule-combination,default,valgrind,32))
297$(eval $(call create-core-oat-target-rule-combination,optimizing,valgrind,32))
298$(eval $(call create-core-oat-target-rule-combination,interpreter,valgrind,32))
Andreas Gampe825570c2015-07-26 10:26:03 -0700299$(eval $(call create-core-oat-target-rule-combination,interp-ac,valgrind,32))
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700300$(eval $(call create-core-oat-target-rule-combination,jit,valgrind,32))
Andreas Gampe088b16e2014-12-03 21:59:27 -0800301
302valgrind-test-art-host-dex2oat-target: $(valgrindTARGET_CORE_IMG_OUTS)
303
304valgrind-test-art-host-dex2oat: valgrind-test-art-host-dex2oat-host valgrind-test-art-host-dex2oat-target