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_BUILD_MK |
| 18 | ART_ANDROID_COMMON_BUILD_MK = true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 19 | |
| 20 | include 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 | # |
| 31 | ART_BUILD_TARGET_NDEBUG ?= true |
| 32 | ART_BUILD_TARGET_DEBUG ?= true |
| 33 | ART_BUILD_HOST_NDEBUG ?= true |
| 34 | ART_BUILD_HOST_DEBUG ?= true |
Calin Juravle | 676ff8e | 2015-07-24 16:45:26 +0100 | [diff] [blame] | 35 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 36 | ifeq ($(ART_BUILD_TARGET_NDEBUG),false) |
| 37 | $(info Disabling ART_BUILD_TARGET_NDEBUG) |
| 38 | endif |
| 39 | ifeq ($(ART_BUILD_TARGET_DEBUG),false) |
| 40 | $(info Disabling ART_BUILD_TARGET_DEBUG) |
| 41 | endif |
| 42 | ifeq ($(ART_BUILD_HOST_NDEBUG),false) |
| 43 | $(info Disabling ART_BUILD_HOST_NDEBUG) |
| 44 | endif |
| 45 | ifeq ($(ART_BUILD_HOST_DEBUG),false) |
| 46 | $(info Disabling ART_BUILD_HOST_DEBUG) |
| 47 | endif |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 48 | |
Hiroshi Yamauchi | fd3161a | 2017-01-18 14:47:25 -0800 | [diff] [blame] | 49 | # Enable the read barrier by default. |
| 50 | ART_USE_READ_BARRIER ?= true |
| 51 | |
Mathieu Chartier | a7f6b81 | 2017-12-11 13:34:29 -0800 | [diff] [blame] | 52 | # Default compact dex level to none. |
| 53 | ifeq ($(ART_DEFAULT_COMPACT_DEX_LEVEL),) |
| 54 | ART_DEFAULT_COMPACT_DEX_LEVEL := none |
| 55 | endif |
| 56 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 57 | ART_CPP_EXTENSION := .cc |
| 58 | |
Ying Wang | a28ff0f | 2014-12-08 14:29:34 -0800 | [diff] [blame] | 59 | ifndef LIBART_IMG_HOST_BASE_ADDRESS |
| 60 | $(error LIBART_IMG_HOST_BASE_ADDRESS unset) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 61 | endif |
Andreas Gampe | d126228 | 2016-08-11 18:35:58 -0700 | [diff] [blame] | 62 | |
Ying Wang | a28ff0f | 2014-12-08 14:29:34 -0800 | [diff] [blame] | 63 | ifndef LIBART_IMG_TARGET_BASE_ADDRESS |
| 64 | $(error LIBART_IMG_TARGET_BASE_ADDRESS unset) |
| 65 | endif |
Bilyan Borisov | 3071f80 | 2016-03-31 17:15:53 +0100 | [diff] [blame] | 66 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 67 | # Support for disabling certain builds. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 68 | ART_BUILD_TARGET := false |
| 69 | ART_BUILD_HOST := false |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 70 | ifeq ($(ART_BUILD_TARGET_NDEBUG),true) |
| 71 | ART_BUILD_TARGET := true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 72 | endif |
| 73 | ifeq ($(ART_BUILD_TARGET_DEBUG),true) |
| 74 | ART_BUILD_TARGET := true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 75 | endif |
| 76 | ifeq ($(ART_BUILD_HOST_NDEBUG),true) |
| 77 | ART_BUILD_HOST := true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 78 | endif |
| 79 | ifeq ($(ART_BUILD_HOST_DEBUG),true) |
| 80 | ART_BUILD_HOST := true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 81 | endif |
| 82 | |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 83 | endif # ART_ANDROID_COMMON_BUILD_MK |