• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 ifndef ART_ANDROID_COMMON_BUILD_MK
18 ART_ANDROID_COMMON_BUILD_MK = true
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
35 
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
48 
49 # Enable the read barrier by default.
50 ART_USE_READ_BARRIER ?= true
51 
52 ART_CPP_EXTENSION := .cc
53 
54 ifndef LIBART_IMG_HOST_BASE_ADDRESS
55   $(error LIBART_IMG_HOST_BASE_ADDRESS unset)
56 endif
57 
58 ifndef LIBART_IMG_TARGET_BASE_ADDRESS
59   $(error LIBART_IMG_TARGET_BASE_ADDRESS unset)
60 endif
61 
62 # Support for disabling certain builds.
63 ART_BUILD_TARGET := false
64 ART_BUILD_HOST := false
65 ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
66   ART_BUILD_TARGET := true
67 endif
68 ifeq ($(ART_BUILD_TARGET_DEBUG),true)
69   ART_BUILD_TARGET := true
70 endif
71 ifeq ($(ART_BUILD_HOST_NDEBUG),true)
72   ART_BUILD_HOST := true
73 endif
74 ifeq ($(ART_BUILD_HOST_DEBUG),true)
75   ART_BUILD_HOST := true
76 endif
77 
78 endif # ART_ANDROID_COMMON_BUILD_MK
79