blob: 7550f50a6d8d35b4b1436b5b9810505e79e3edd5 [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
Igor Murashkin37743352014-11-13 14:38:00 -080021include art/build/Android.common_utils.mk
Ian Rogersafd9acc2014-06-17 08:21:54 -070022
23# These can be overridden via the environment or by editing to
24# enable/disable certain build configuration.
25#
26# For example, to disable everything but the host debug build you use:
27#
28# (export ART_BUILD_TARGET_NDEBUG=false && export ART_BUILD_TARGET_DEBUG=false && export ART_BUILD_HOST_NDEBUG=false && ...)
29#
30# Beware that tests may use the non-debug build for performance, notable 055-enum-performance
31#
32ART_BUILD_TARGET_NDEBUG ?= true
33ART_BUILD_TARGET_DEBUG ?= true
34ART_BUILD_HOST_NDEBUG ?= true
35ART_BUILD_HOST_DEBUG ?= true
Calin Juravle676ff8e2015-07-24 16:45:26 +010036
37# Enable the static builds only for checkbuilds.
38ifneq (,$(filter checkbuild,$(MAKECMDGOALS)))
39 ART_BUILD_HOST_STATIC ?= true
40else
41 ART_BUILD_HOST_STATIC ?= false
42endif
Ian Rogersafd9acc2014-06-17 08:21:54 -070043
Calin Juravle4895ea42015-07-02 18:21:14 +010044# Asan does not support static linkage
45ifdef SANITIZE_HOST
46 ART_BUILD_HOST_STATIC := false
47endif
48
Calin Juravle0e26f462015-07-09 15:48:03 +010049ifneq ($(HOST_OS),linux)
Calin Juravle4895ea42015-07-02 18:21:14 +010050 ART_BUILD_HOST_STATIC := false
51endif
52
Ian Rogersafd9acc2014-06-17 08:21:54 -070053ifeq ($(ART_BUILD_TARGET_NDEBUG),false)
54$(info Disabling ART_BUILD_TARGET_NDEBUG)
55endif
56ifeq ($(ART_BUILD_TARGET_DEBUG),false)
57$(info Disabling ART_BUILD_TARGET_DEBUG)
58endif
59ifeq ($(ART_BUILD_HOST_NDEBUG),false)
60$(info Disabling ART_BUILD_HOST_NDEBUG)
61endif
62ifeq ($(ART_BUILD_HOST_DEBUG),false)
63$(info Disabling ART_BUILD_HOST_DEBUG)
64endif
Calin Juravle65e069d2015-06-08 10:35:24 +010065ifeq ($(ART_BUILD_HOST_STATIC),true)
66$(info Enabling ART_BUILD_HOST_STATIC)
67endif
Ian Rogersafd9acc2014-06-17 08:21:54 -070068
Hiroshi Yamauchi093f1b42015-07-14 12:20:30 -070069ifeq ($(ART_TEST_DEBUG_GC),true)
70 ART_DEFAULT_GC_TYPE := SS
71 ART_USE_TLAB := true
72endif
73
Ian Rogersafd9acc2014-06-17 08:21:54 -070074#
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080075# Used to enable JIT
76#
77ART_JIT := false
78ifneq ($(wildcard art/JIT_ART),)
79$(info Enabling ART_JIT because of existence of art/JIT_ART)
80ART_JIT := true
81endif
82ifeq ($(WITH_ART_JIT), true)
83ART_JIT := true
84endif
85
86#
Ian Rogersafd9acc2014-06-17 08:21:54 -070087# Used to change the default GC. Valid values are CMS, SS, GSS. The default is CMS.
88#
Hiroshi Yamauchi3e781622015-02-25 12:52:34 -080089ART_DEFAULT_GC_TYPE ?= CMS
90art_default_gc_type_cflags := -DART_DEFAULT_GC_TYPE_IS_$(ART_DEFAULT_GC_TYPE)
Ian Rogersafd9acc2014-06-17 08:21:54 -070091
Andreas Gampeee0ebc82014-10-21 21:07:28 -070092ART_HOST_CFLAGS :=
93ART_TARGET_CFLAGS :=
94
Roland Levillain12bd7212015-06-04 17:50:27 +010095ART_HOST_ASFLAGS :=
96ART_TARGET_ASFLAGS :=
97
Ian Rogersafd9acc2014-06-17 08:21:54 -070098# Clang build support.
99
100# Host.
101ART_HOST_CLANG := false
102ifneq ($(WITHOUT_HOST_CLANG),true)
103 # By default, host builds use clang for better warnings.
104 ART_HOST_CLANG := true
105endif
106
Sebastien Hertzea521dc2014-06-25 18:50:01 +0200107# Clang on the target. Target builds use GCC by default.
Bernhard Rosenkraenzer88c05692014-10-04 19:02:06 +0200108ifneq ($(USE_CLANG_PLATFORM_BUILD),)
109ART_TARGET_CLANG := $(USE_CLANG_PLATFORM_BUILD)
110else
Ian Rogersd642a912014-10-02 09:41:44 -0700111ART_TARGET_CLANG := false
Bernhard Rosenkraenzer88c05692014-10-04 19:02:06 +0200112endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700113ART_TARGET_CLANG_arm :=
Sebastien Hertzea521dc2014-06-25 18:50:01 +0200114ART_TARGET_CLANG_arm64 :=
Duane Sand91ddd0d2015-05-01 11:34:51 -0700115ART_TARGET_CLANG_mips :=
116ART_TARGET_CLANG_mips64 :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700117ART_TARGET_CLANG_x86 :=
118ART_TARGET_CLANG_x86_64 :=
119
120define set-target-local-clang-vars
121 LOCAL_CLANG := $(ART_TARGET_CLANG)
122 $(foreach arch,$(ART_TARGET_SUPPORTED_ARCH),
123 ifneq ($$(ART_TARGET_CLANG_$(arch)),)
124 LOCAL_CLANG_$(arch) := $$(ART_TARGET_CLANG_$(arch))
125 endif)
126endef
127
Ian Rogersafd9acc2014-06-17 08:21:54 -0700128ART_TARGET_CLANG_CFLAGS :=
129ART_TARGET_CLANG_CFLAGS_arm :=
130ART_TARGET_CLANG_CFLAGS_arm64 :=
131ART_TARGET_CLANG_CFLAGS_mips :=
Andreas Gampe1a5c4062015-01-15 12:10:47 -0800132ART_TARGET_CLANG_CFLAGS_mips64 :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700133ART_TARGET_CLANG_CFLAGS_x86 :=
134ART_TARGET_CLANG_CFLAGS_x86_64 :=
135
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700136# Warn about thread safety violations with clang.
Mathieu Chartier90443472015-07-16 20:32:27 -0700137art_clang_cflags := -Wthread-safety -Wthread-safety-negative
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700138
139# Warn if switch fallthroughs aren't annotated.
140art_clang_cflags += -Wimplicit-fallthrough
141
142# Enable float equality warnings.
143art_clang_cflags += -Wfloat-equal
144
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800145# Enable warning of converting ints to void*.
146art_clang_cflags += -Wint-to-void-pointer-cast
147
Andreas Gampeca714582015-04-03 19:41:34 -0700148# Enable warning of wrong unused annotations.
149art_clang_cflags += -Wused-but-marked-unused
150
Andreas Gampe758a8012015-04-03 21:28:42 -0700151# Enable warning for deprecated language features.
152art_clang_cflags += -Wdeprecated
153
Andreas Gampe66222662015-04-06 19:50:46 -0700154# Enable warning for unreachable break & return.
155art_clang_cflags += -Wunreachable-code-break -Wunreachable-code-return
156
157# Enable missing-noreturn only on non-Mac. As lots of things are not implemented for Apple, it's
158# a pain.
159ifneq ($(HOST_OS),darwin)
160 art_clang_cflags += -Wmissing-noreturn
161endif
Andreas Gampe65b798e2015-04-06 09:35:22 -0700162
Andreas Gampeca714582015-04-03 19:41:34 -0700163
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800164# GCC-only warnings.
165art_gcc_cflags := -Wunused-but-set-parameter
166# Suggest const: too many false positives, but good for a trial run.
167# -Wsuggest-attribute=const
168# Useless casts: too many, as we need to be 32/64 agnostic, but the compiler knows.
169# -Wuseless-cast
170# Zero-as-null: Have to convert all NULL and "diagnostic ignore" all includes like libnativehelper
171# that are still stuck pre-C++11.
172# -Wzero-as-null-pointer-constant \
173# Suggest final: Have to move to a more recent GCC.
174# -Wsuggest-final-types
175
Andreas Gampebced67d2015-01-07 14:35:44 -0800176ART_TARGET_CLANG_CFLAGS := $(art_clang_cflags)
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700177ifeq ($(ART_HOST_CLANG),true)
Ian Rogers4ad5cd32014-11-11 23:08:07 -0800178 # Bug: 15446488. We don't omit the frame pointer to work around
179 # clang/libunwind bugs that cause SEGVs in run-test-004-ThreadStress.
180 ART_HOST_CFLAGS += $(art_clang_cflags) -fno-omit-frame-pointer
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800181else
182 ART_HOST_CFLAGS += $(art_gcc_cflags)
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700183endif
Andreas Gampebced67d2015-01-07 14:35:44 -0800184ifneq ($(ART_TARGET_CLANG),true)
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800185 ART_TARGET_CFLAGS += $(art_gcc_cflags)
Andreas Gampebced67d2015-01-07 14:35:44 -0800186else
187 # TODO: if we ever want to support GCC/Clang mix for multi-target products, this needs to be
188 # split up.
189 ifeq ($(ART_TARGET_CLANG_$(TARGET_ARCH)),false)
190 ART_TARGET_CFLAGS += $(art_gcc_cflags)
191 endif
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700192endif
193
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800194# Clear local variables now their use has ended.
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700195art_clang_cflags :=
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800196art_gcc_cflags :=
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700197
198ART_CPP_EXTENSION := .cc
199
200ART_C_INCLUDES := \
201 external/gtest/include \
Jeff Hao848f70a2014-01-15 13:49:50 -0800202 external/icu/icu4c/source/common \
Dmitriy Ivanov6130f732015-05-27 15:34:38 -0700203 external/valgrind/include \
204 external/valgrind \
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700205 external/vixl/src \
206 external/zlib \
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700207
Andreas Gampe4382f1e2015-08-05 01:08:53 +0000208# We optimize Thread::Current() with a direct TLS access. This requires access to a private
209# Bionic header.
210# Note: technically we only need this on device, but this avoids the duplication of the includes.
211ART_C_INCLUDES += bionic/libc/private
212
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700213# Base set of cflags used by all things ART.
214art_cflags := \
215 -fno-rtti \
216 -std=gnu++11 \
217 -ggdb3 \
218 -Wall \
219 -Werror \
220 -Wextra \
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700221 -Wstrict-aliasing \
222 -fstrict-aliasing \
223 -Wunreachable-code \
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800224 -Wredundant-decls \
225 -Wshadow \
Andreas Gampe7c3952f2015-02-19 18:21:24 -0800226 -Wunused \
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700227 -fvisibility=protected \
228 $(art_default_gc_type_cflags)
229
Roland Levillain12bd7212015-06-04 17:50:27 +0100230# Base set of asflags used by all things ART.
231art_asflags :=
232
Andreas Gampe277ccbd2014-11-03 21:36:10 -0800233# Missing declarations: too many at the moment, as we use "extern" quite a bit.
234# -Wmissing-declarations \
235
236
Mathieu Chartiercd195fe2014-11-25 18:36:01 -0800237
238ifdef ART_IMT_SIZE
239 art_cflags += -DIMT_SIZE=$(ART_IMT_SIZE)
240else
241 # Default is 64
242 art_cflags += -DIMT_SIZE=64
243endif
244
Nicolas Geoffray9bb492a2014-11-25 23:42:00 +0000245ifeq ($(ART_USE_OPTIMIZING_COMPILER),true)
246 art_cflags += -DART_USE_OPTIMIZING_COMPILER=1
247endif
248
Hiroshi Yamauchib0d22f12014-12-08 12:08:46 -0800249ifeq ($(ART_HEAP_POISONING),true)
250 art_cflags += -DART_HEAP_POISONING=1
Roland Levillain12bd7212015-06-04 17:50:27 +0100251 art_asflags += -DART_HEAP_POISONING=1
Hiroshi Yamauchib0d22f12014-12-08 12:08:46 -0800252endif
253
Hiroshi Yamauchic23f0d82015-01-23 17:23:42 -0800254ifeq ($(ART_USE_READ_BARRIER),true)
255 art_cflags += -DART_USE_READ_BARRIER=1
Roland Levillain12bd7212015-06-04 17:50:27 +0100256 art_asflags += -DART_USE_READ_BARRIER=1
Hiroshi Yamauchic23f0d82015-01-23 17:23:42 -0800257endif
258
Hiroshi Yamauchi79bd2bf2015-03-20 10:28:34 -0700259ifeq ($(ART_USE_TLAB),true)
260 art_cflags += -DART_USE_TLAB=1
261endif
262
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700263# Cflags for non-debug ART and ART tools.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700264art_non_debug_cflags := \
265 -O3
266
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700267# Cflags for debug ART and ART tools.
268art_debug_cflags := \
Nicolas Geoffray40e7f0e2015-02-03 10:13:27 +0000269 -O2 \
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700270 -DDYNAMIC_ANNOTATIONS_ENABLED=1 \
Serban Constantinescu32f5b4d2014-11-25 20:05:46 +0000271 -DVIXL_DEBUG \
Ian Rogers50fe6da2014-10-17 01:18:08 -0700272 -UNDEBUG
Stephen Hines67a43382014-07-17 01:49:18 -0700273
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700274art_host_non_debug_cflags := $(art_non_debug_cflags)
275art_target_non_debug_cflags := $(art_non_debug_cflags)
Stephen Hines67a43382014-07-17 01:49:18 -0700276
Ian Rogersafd9acc2014-06-17 08:21:54 -0700277ifeq ($(HOST_OS),linux)
Stephen Hines67a43382014-07-17 01:49:18 -0700278 # Larger frame-size for host clang builds today
Dan Albert31fb2602014-09-30 22:10:10 -0700279 ifneq ($(ART_COVERAGE),true)
280 ifneq ($(NATIVE_COVERAGE),true)
Evgenii Stepanov1e133742015-05-20 12:30:59 -0700281 art_host_non_debug_cflags += -Wframe-larger-than=2700
282 ifdef SANITIZE_TARGET
283 art_target_non_debug_cflags += -Wframe-larger-than=5450
284 else
Evgenii Stepanove1b6e972015-06-15 15:55:22 -0700285 art_target_non_debug_cflags += -Wframe-larger-than=1728
286 endif
Dan Albert31fb2602014-09-30 22:10:10 -0700287 endif
Dan Albert98b8bcf2014-11-14 19:56:21 -0800288 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700289endif
290
Ying Wanga28ff0f2014-12-08 14:29:34 -0800291ifndef LIBART_IMG_HOST_BASE_ADDRESS
292 $(error LIBART_IMG_HOST_BASE_ADDRESS unset)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700293endif
Ying Wanga28ff0f2014-12-08 14:29:34 -0800294ART_HOST_CFLAGS += $(art_cflags) -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
295ART_HOST_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES=default
Roland Levillain12bd7212015-06-04 17:50:27 +0100296ART_HOST_ASFLAGS += $(art_asflags)
Ying Wanga28ff0f2014-12-08 14:29:34 -0800297
Pirama Arumuga Nainar15144b82015-07-09 11:18:26 -0700298# Disable -Wpessimizing-move: triggered for art/runtime/base/variant_map.h:261
299# Adding this flag to art_clang_cflags doesn't work because -Wall gets added to
300# ART_HOST_CFLAGS (as a part of art_cflags) after
301# -Wno-pessimizing-move. Instead, add the flag here to both
302# ART_TARGET_CLANG_CFLAGS and ART_HOST_CFLAGS
303ifeq ($(ART_HOST_CLANG),true)
304ART_HOST_CFLAGS += -Wno-pessimizing-move
305endif
306ART_TARGET_CLANG_CFLAGS += -Wno-pessimizing-move
307
Dan Albertbc0d79b2015-08-17 10:14:51 -0700308# The latest clang update trips over many of the files in art and never finishes
309# compiling for aarch64 with -O3 (or -O2). Drop back to -O1 while we investigate
310# to stop punishing the build server.
311# Bug: http://b/23256622
312ART_TARGET_CLANG_CFLAGS_arm64 += -O1
313
Ying Wanga28ff0f2014-12-08 14:29:34 -0800314ifndef LIBART_IMG_TARGET_BASE_ADDRESS
315 $(error LIBART_IMG_TARGET_BASE_ADDRESS unset)
316endif
317ART_TARGET_CFLAGS += $(art_cflags) -DART_TARGET -DART_BASE_ADDRESS=$(LIBART_IMG_TARGET_BASE_ADDRESS)
Roland Levillain12bd7212015-06-04 17:50:27 +0100318ART_TARGET_ASFLAGS += $(art_asflags)
Alex Lighta59dd802014-07-02 16:28:08 -0700319
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700320ART_HOST_NON_DEBUG_CFLAGS := $(art_host_non_debug_cflags)
321ART_TARGET_NON_DEBUG_CFLAGS := $(art_target_non_debug_cflags)
322ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags)
323ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
324
Alex Lighta59dd802014-07-02 16:28:08 -0700325ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA
326 LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA=-0x1000000
327endif
328ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA
329 LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA=0x1000000
330endif
331ART_HOST_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
332ART_HOST_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
333
334ifndef LIBART_IMG_TARGET_MIN_BASE_ADDRESS_DELTA
335 LIBART_IMG_TARGET_MIN_BASE_ADDRESS_DELTA=-0x1000000
336endif
337ifndef LIBART_IMG_TARGET_MAX_BASE_ADDRESS_DELTA
338 LIBART_IMG_TARGET_MAX_BASE_ADDRESS_DELTA=0x1000000
339endif
340ART_TARGET_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LIBART_IMG_TARGET_MIN_BASE_ADDRESS_DELTA)
341ART_TARGET_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LIBART_IMG_TARGET_MAX_BASE_ADDRESS_DELTA)
342
Ian Rogersafd9acc2014-06-17 08:21:54 -0700343# To use oprofile_android --callgraph, uncomment this and recompile with "mmm art -B -j16"
344# ART_TARGET_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
345
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700346# Clear locals now they've served their purpose.
347art_cflags :=
Roland Levillain12bd7212015-06-04 17:50:27 +0100348art_asflags :=
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700349art_debug_cflags :=
350art_non_debug_cflags :=
351art_host_non_debug_cflags :=
352art_target_non_debug_cflags :=
353art_default_gc_type :=
354art_default_gc_type_cflags :=
355
356ART_HOST_LDLIBS :=
357ifneq ($(ART_HOST_CLANG),true)
358 # GCC lacks libc++ assumed atomic operations, grab via libatomic.
359 ART_HOST_LDLIBS += -latomic
Ian Rogersafd9acc2014-06-17 08:21:54 -0700360endif
361
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700362ART_TARGET_LDFLAGS :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700363
364# $(1): ndebug_or_debug
365define set-target-local-cflags-vars
366 LOCAL_CFLAGS += $(ART_TARGET_CFLAGS)
367 LOCAL_CFLAGS_x86 += $(ART_TARGET_CFLAGS_x86)
Roland Levillain12bd7212015-06-04 17:50:27 +0100368 LOCAL_ASFLAGS += $(ART_TARGET_ASFLAGS)
Dehao Chen997660d2014-07-08 10:00:56 -0700369 LOCAL_LDFLAGS += $(ART_TARGET_LDFLAGS)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700370 art_target_cflags_ndebug_or_debug := $(1)
371 ifeq ($$(art_target_cflags_ndebug_or_debug),debug)
372 LOCAL_CFLAGS += $(ART_TARGET_DEBUG_CFLAGS)
373 else
374 LOCAL_CFLAGS += $(ART_TARGET_NON_DEBUG_CFLAGS)
375 endif
376
Andreas Gampebced67d2015-01-07 14:35:44 -0800377 LOCAL_CLANG_CFLAGS := $(ART_TARGET_CLANG_CFLAGS)
Dan Albertbc0d79b2015-08-17 10:14:51 -0700378 $(foreach arch,$(ART_TARGET_SUPPORTED_ARCH),
Andreas Gampebced67d2015-01-07 14:35:44 -0800379 LOCAL_CLANG_CFLAGS_$(arch) += $$(ART_TARGET_CLANG_CFLAGS_$(arch)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700380
381 # Clear locally used variables.
382 art_target_cflags_ndebug_or_debug :=
383endef
384
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700385# Support for disabling certain builds.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700386ART_BUILD_TARGET := false
387ART_BUILD_HOST := false
388ART_BUILD_NDEBUG := false
389ART_BUILD_DEBUG := false
390ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
391 ART_BUILD_TARGET := true
392 ART_BUILD_NDEBUG := true
393endif
394ifeq ($(ART_BUILD_TARGET_DEBUG),true)
395 ART_BUILD_TARGET := true
396 ART_BUILD_DEBUG := true
397endif
398ifeq ($(ART_BUILD_HOST_NDEBUG),true)
399 ART_BUILD_HOST := true
400 ART_BUILD_NDEBUG := true
401endif
402ifeq ($(ART_BUILD_HOST_DEBUG),true)
403 ART_BUILD_HOST := true
404 ART_BUILD_DEBUG := true
405endif
406
Igor Murashkin37743352014-11-13 14:38:00 -0800407endif # ART_ANDROID_COMMON_BUILD_MK