1#
2# Copyright (C) 2012 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
17LOCAL_CLANG := true
18
19LOCAL_CFLAGS := \
20  -Wall \
21  -Wno-unused-parameter \
22  -Werror \
23  -DTARGET_BUILD \
24  $(RS_VERSION_DEFINE) \
25  $(LOCAL_CFLAGS)
26
27
28ifneq ($(BOARD_OVERRIDE_RS_CPU_VARIANT_32),)
29LOCAL_CFLAGS += -DFORCE_CPU_VARIANT_32=$(BOARD_OVERRIDE_RS_CPU_VARIANT_32)
30endif
31
32ifneq ($(BOARD_OVERRIDE_RS_CPU_VARIANT_64),)
33LOCAL_CFLAGS += -DFORCE_CPU_VARIANT_64=$(BOARD_OVERRIDE_RS_CPU_VARIANT_64)
34endif
35
36ifeq ($(TARGET_BUILD_VARIANT),eng)
37LOCAL_CFLAGS += -DANDROID_ENGINEERING_BUILD
38else
39LOCAL_CFLAGS += -D__DISABLE_ASSERTS
40endif
41
42ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
43LOCAL_CFLAGS += -DFORCE_BUILD_LLVM_DISABLE_NDEBUG
44endif
45
46#=====================================================================
47# Architecture Selection
48#=====================================================================
49# Note: We should only use -DFORCE_ARCH_CODEGEN on target build.
50# For the host build, we will include as many architecture as possible,
51# so that we can test the execution engine easily.
52
53LOCAL_MODULE_TARGET_ARCH := $(LLVM_SUPPORTED_ARCH)
54
55include frameworks/compile/libbcc/libbcc-targets.mk
56
57LOCAL_C_INCLUDES := \
58  $(LIBBCC_ROOT_PATH)/include \
59  $(RS_ROOT_PATH) \
60  $(LLVM_ROOT_PATH)/include \
61  $(LLVM_ROOT_PATH)/device/include \
62  $(LOCAL_C_INCLUDES)
63