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