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 | |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 17 | ifndef ART_ANDROID_COMMON_MK |
| 18 | ART_ANDROID_COMMON_MK = true |
Dragos Sbirlea | 37c19bc | 2013-07-29 09:38:31 -0700 | [diff] [blame] | 19 | |
Andreas Gampe | 1a5c406 | 2015-01-15 12:10:47 -0800 | [diff] [blame] | 20 | ART_TARGET_SUPPORTED_ARCH := arm arm64 mips mips64 x86 x86_64 |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 21 | ART_HOST_SUPPORTED_ARCH := x86 x86_64 |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 22 | |
Ying Wang | 754a445 | 2015-07-21 12:05:30 -0700 | [diff] [blame] | 23 | ifneq ($(HOST_OS),darwin) |
| 24 | ART_HOST_SUPPORTED_ARCH := x86 x86_64 |
| 25 | else |
| 26 | # Mac OS doesn't support low-4GB allocation in a 64-bit process. So we won't be able to create |
| 27 | # our heaps. |
| 28 | ART_HOST_SUPPORTED_ARCH := x86 |
Ying Wang | 754a445 | 2015-07-21 12:05:30 -0700 | [diff] [blame] | 29 | endif |
| 30 | |
Dan Albert | 31fb260 | 2014-09-30 22:10:10 -0700 | [diff] [blame] | 31 | ART_COVERAGE := false |
| 32 | |
| 33 | ifeq ($(ART_COVERAGE),true) |
| 34 | # https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html |
| 35 | GCOV_PREFIX := /data/local/tmp/gcov |
| 36 | # GCOV_PREFIX_STRIP is an integer that defines how many levels should be |
| 37 | # stripped off the beginning of the path. We want the paths in $GCOV_PREFIX to |
| 38 | # be relative to $ANDROID_BUILD_TOP so we can just adb pull from the top and not |
| 39 | # have to worry about placing things ourselves. |
| 40 | GCOV_PREFIX_STRIP := $(shell echo $(ANDROID_BUILD_TOP) | grep -o / | wc -l) |
| 41 | GCOV_ENV := GCOV_PREFIX=$(GCOV_PREFIX) GCOV_PREFIX_STRIP=$(GCOV_PREFIX_STRIP) |
| 42 | else |
| 43 | GCOV_ENV := |
| 44 | endif |
| 45 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 46 | ifeq (,$(filter $(TARGET_ARCH),$(ART_TARGET_SUPPORTED_ARCH))) |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 47 | $(warning unsupported TARGET_ARCH=$(TARGET_ARCH)) |
| 48 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 49 | ifeq (,$(filter $(HOST_ARCH),$(ART_HOST_SUPPORTED_ARCH))) |
| 50 | $(warning unsupported HOST_ARCH=$(HOST_ARCH)) |
Brian Carlstrom | afdc560 | 2014-06-10 15:42:52 -0700 | [diff] [blame] | 51 | endif |
Andreas Gampe | 922141a | 2014-03-12 10:59:26 -0700 | [diff] [blame] | 52 | |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 53 | # Primary vs. secondary |
| 54 | 2ND_TARGET_ARCH := $(TARGET_2ND_ARCH) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 55 | TARGET_INSTRUCTION_SET_FEATURES := $(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) |
| 56 | 2ND_TARGET_INSTRUCTION_SET_FEATURES := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 57 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 58 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 59 | ART_PHONY_TEST_TARGET_SUFFIX := 64 |
| 60 | 2ND_ART_PHONY_TEST_TARGET_SUFFIX := 32 |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 61 | else |
Ying Wang | 6a63bac | 2016-03-16 19:40:00 -0700 | [diff] [blame] | 62 | ART_PHONY_TEST_TARGET_SUFFIX := 32 |
| 63 | 2ND_ART_PHONY_TEST_TARGET_SUFFIX := |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 64 | endif |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 65 | else |
Nicolas Geoffray | 7372b76 | 2014-11-07 10:10:39 +0000 | [diff] [blame] | 66 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
| 67 | ART_PHONY_TEST_TARGET_SUFFIX := 64 |
| 68 | 2ND_ART_PHONY_TEST_TARGET_SUFFIX := |
Nicolas Geoffray | 7372b76 | 2014-11-07 10:10:39 +0000 | [diff] [blame] | 69 | else |
| 70 | ART_PHONY_TEST_TARGET_SUFFIX := 32 |
| 71 | 2ND_ART_PHONY_TEST_TARGET_SUFFIX := |
Nicolas Geoffray | 7372b76 | 2014-11-07 10:10:39 +0000 | [diff] [blame] | 72 | endif |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 73 | endif |
Brian Carlstrom | 47a0d5a | 2011-10-12 21:20:05 -0700 | [diff] [blame] | 74 | |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 75 | ART_HOST_SHLIB_EXTENSION := $(HOST_SHLIB_SUFFIX) |
| 76 | ART_HOST_SHLIB_EXTENSION ?= .so |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 77 | ifeq ($(HOST_PREFER_32_BIT),true) |
| 78 | ART_PHONY_TEST_HOST_SUFFIX := 32 |
| 79 | 2ND_ART_PHONY_TEST_HOST_SUFFIX := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 80 | ART_HOST_ARCH := x86 |
| 81 | 2ND_ART_HOST_ARCH := |
| 82 | 2ND_HOST_ARCH := |
| 83 | ART_HOST_OUT_SHARED_LIBRARIES := $(2ND_HOST_OUT_SHARED_LIBRARIES) |
| 84 | 2ND_ART_HOST_OUT_SHARED_LIBRARIES := |
Elliott Hughes | 1d3f114 | 2011-09-13 12:00:00 -0700 | [diff] [blame] | 85 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 86 | ART_PHONY_TEST_HOST_SUFFIX := 64 |
| 87 | 2ND_ART_PHONY_TEST_HOST_SUFFIX := 32 |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 88 | ART_HOST_ARCH := x86_64 |
| 89 | 2ND_ART_HOST_ARCH := x86 |
| 90 | 2ND_HOST_ARCH := x86 |
| 91 | ART_HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT_SHARED_LIBRARIES) |
| 92 | 2ND_ART_HOST_OUT_SHARED_LIBRARIES := $(2ND_HOST_OUT_SHARED_LIBRARIES) |
Elliott Hughes | 1d3f114 | 2011-09-13 12:00:00 -0700 | [diff] [blame] | 93 | endif |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 94 | |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 95 | ADB_EXECUTABLE := $(HOST_OUT_EXECUTABLES)/adb |
Nicolas Geoffray | c8d5813 | 2018-10-12 10:46:28 +0100 | [diff] [blame] | 96 | ADB ?= $(ADB_EXECUTABLE) |
Nicolas Geoffray | 64c2d77 | 2018-08-31 09:22:44 +0100 | [diff] [blame] | 97 | |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 98 | endif # ART_ANDROID_COMMON_MK |