blob: f5a95fa0cfc41ce90940593a544db81b1ea42957 [file] [log] [blame]
Ian Rogersafd9acc2014-06-17 08:21:54 -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
Igor Murashkin37743352014-11-13 14:38:00 -080017ifndef ART_ANDROID_COMMON_BUILD_MK
18ART_ANDROID_COMMON_BUILD_MK = true
Ian Rogersafd9acc2014-06-17 08:21:54 -070019
20include art/build/Android.common.mk
21
22# These can be overridden via the environment or by editing to
23# enable/disable certain build configuration.
24#
25# For example, to disable everything but the host debug build you use:
26#
27# (export ART_BUILD_TARGET_NDEBUG=false && export ART_BUILD_TARGET_DEBUG=false && export ART_BUILD_HOST_NDEBUG=false && ...)
28#
29# Beware that tests may use the non-debug build for performance, notable 055-enum-performance
30#
31ART_BUILD_TARGET_NDEBUG ?= true
32ART_BUILD_TARGET_DEBUG ?= true
33ART_BUILD_HOST_NDEBUG ?= true
34ART_BUILD_HOST_DEBUG ?= true
Calin Juravle676ff8e2015-07-24 16:45:26 +010035
Ian Rogersafd9acc2014-06-17 08:21:54 -070036ifeq ($(ART_BUILD_TARGET_NDEBUG),false)
37$(info Disabling ART_BUILD_TARGET_NDEBUG)
38endif
39ifeq ($(ART_BUILD_TARGET_DEBUG),false)
40$(info Disabling ART_BUILD_TARGET_DEBUG)
41endif
42ifeq ($(ART_BUILD_HOST_NDEBUG),false)
43$(info Disabling ART_BUILD_HOST_NDEBUG)
44endif
45ifeq ($(ART_BUILD_HOST_DEBUG),false)
46$(info Disabling ART_BUILD_HOST_DEBUG)
47endif
Ian Rogers6f3dbba2014-10-14 17:41:57 -070048
Hiroshi Yamauchifd3161a2017-01-18 14:47:25 -080049# Enable the read barrier by default.
50ART_USE_READ_BARRIER ?= true
51
Ian Rogers6f3dbba2014-10-14 17:41:57 -070052ART_CPP_EXTENSION := .cc
53
Ying Wanga28ff0f2014-12-08 14:29:34 -080054ifndef LIBART_IMG_HOST_BASE_ADDRESS
55 $(error LIBART_IMG_HOST_BASE_ADDRESS unset)
Ian Rogersafd9acc2014-06-17 08:21:54 -070056endif
Andreas Gamped1262282016-08-11 18:35:58 -070057
Ying Wanga28ff0f2014-12-08 14:29:34 -080058ifndef LIBART_IMG_TARGET_BASE_ADDRESS
59 $(error LIBART_IMG_TARGET_BASE_ADDRESS unset)
60endif
Bilyan Borisov3071f802016-03-31 17:15:53 +010061
Ian Rogers6f3dbba2014-10-14 17:41:57 -070062# Support for disabling certain builds.
Ian Rogersafd9acc2014-06-17 08:21:54 -070063ART_BUILD_TARGET := false
64ART_BUILD_HOST := false
Ian Rogersafd9acc2014-06-17 08:21:54 -070065ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
66 ART_BUILD_TARGET := true
Ian Rogersafd9acc2014-06-17 08:21:54 -070067endif
68ifeq ($(ART_BUILD_TARGET_DEBUG),true)
69 ART_BUILD_TARGET := true
Ian Rogersafd9acc2014-06-17 08:21:54 -070070endif
71ifeq ($(ART_BUILD_HOST_NDEBUG),true)
72 ART_BUILD_HOST := true
Ian Rogersafd9acc2014-06-17 08:21:54 -070073endif
74ifeq ($(ART_BUILD_HOST_DEBUG),true)
75 ART_BUILD_HOST := true
Ian Rogersafd9acc2014-06-17 08:21:54 -070076endif
77
Igor Murashkin37743352014-11-13 14:38:00 -080078endif # ART_ANDROID_COMMON_BUILD_MK