1*9880d681SAndroid Build Coastguard WorkerLOCAL_MODULE_TARGET_ARCH := $(LLVM_SUPPORTED_ARCH) 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard WorkerLOCAL_CFLAGS := \ 4*9880d681SAndroid Build Coastguard Worker -D_GNU_SOURCE \ 5*9880d681SAndroid Build Coastguard Worker -D__STDC_LIMIT_MACROS \ 6*9880d681SAndroid Build Coastguard Worker -D__STDC_CONSTANT_MACROS \ 7*9880d681SAndroid Build Coastguard Worker -D__STDC_FORMAT_MACROS \ 8*9880d681SAndroid Build Coastguard Worker -O2 \ 9*9880d681SAndroid Build Coastguard Worker -fomit-frame-pointer \ 10*9880d681SAndroid Build Coastguard Worker -Wall \ 11*9880d681SAndroid Build Coastguard Worker -W \ 12*9880d681SAndroid Build Coastguard Worker -Wno-sign-compare \ 13*9880d681SAndroid Build Coastguard Worker -Wno-unused-parameter \ 14*9880d681SAndroid Build Coastguard Worker -Wwrite-strings \ 15*9880d681SAndroid Build Coastguard Worker -Werror \ 16*9880d681SAndroid Build Coastguard Worker -Dsprintf=sprintf \ 17*9880d681SAndroid Build Coastguard Worker $(LOCAL_CFLAGS) 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker# The three inline options together reduce libbcc.so almost 1MB. 20*9880d681SAndroid Build Coastguard Worker# We move them from global build/core/combo/TARGET_linux-arm.mk 21*9880d681SAndroid Build Coastguard Worker# to here. 22*9880d681SAndroid Build Coastguard WorkerLOCAL_CFLAGS := -DANDROID_TARGET_BUILD \ 23*9880d681SAndroid Build Coastguard Worker -finline-functions \ 24*9880d681SAndroid Build Coastguard Worker $(LOCAL_CFLAGS) 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Workerifeq ($(TARGET_BUILD_VARIANT),eng) 27*9880d681SAndroid Build Coastguard WorkerLOCAL_CFLAGS := -DANDROID_ENGINEERING_BUILD \ 28*9880d681SAndroid Build Coastguard Worker $(LOCAL_CFLAGS) 29*9880d681SAndroid Build Coastguard Workerendif 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Workerifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true) 32*9880d681SAndroid Build Coastguard WorkerLOCAL_CFLAGS := \ 33*9880d681SAndroid Build Coastguard Worker $(LOCAL_CFLAGS) \ 34*9880d681SAndroid Build Coastguard Worker -D_DEBUG \ 35*9880d681SAndroid Build Coastguard Worker -UNDEBUG 36*9880d681SAndroid Build Coastguard Workerendif 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard WorkerLOCAL_CPPFLAGS := \ 39*9880d681SAndroid Build Coastguard Worker $(LOCAL_CPPFLAGS) \ 40*9880d681SAndroid Build Coastguard Worker -Woverloaded-virtual \ 41*9880d681SAndroid Build Coastguard Worker -Wno-sign-promo \ 42*9880d681SAndroid Build Coastguard Worker -std=c++11 43*9880d681SAndroid Build Coastguard Worker 44*9880d681SAndroid Build Coastguard Worker# Make sure bionic is first so we can include system headers. 45*9880d681SAndroid Build Coastguard WorkerLOCAL_C_INCLUDES := \ 46*9880d681SAndroid Build Coastguard Worker bionic \ 47*9880d681SAndroid Build Coastguard Worker $(LLVM_ROOT_PATH) \ 48*9880d681SAndroid Build Coastguard Worker $(LLVM_ROOT_PATH)/include \ 49*9880d681SAndroid Build Coastguard Worker $(LLVM_ROOT_PATH)/device/include \ 50*9880d681SAndroid Build Coastguard Worker $(LOCAL_C_INCLUDES) 51