1# 2# Build targets for an x86 processor 3# 4 5# x86 Environment Checks ####################################################### 6 7ifeq ($(ANDROID_BUILD_TOP),) 8$(error "You should supply an ANDROID_BUILD_TOP environment variable \ 9 containing a path to the Android source tree. This is typically \ 10 provided by initializing the Android build environment.") 11endif 12export X86_TOOLS_PREFIX=$(ANDROID_BUILD_TOP)/prebuilts/clang/host/linux-x86/clang-r370808/bin/ 13 14# x86 Tools #################################################################### 15 16TARGET_AR = $(X86_TOOLS_PREFIX)llvm-ar 17TARGET_CC = $(X86_TOOLS_PREFIX)clang++ 18TARGET_LD = $(X86_TOOLS_PREFIX)clang++ 19 20# x86 Compiler Flags ########################################################### 21 22# Add x86 compiler flags. 23TARGET_CFLAGS += $(X86_CFLAGS) 24 25# x86 is purely used for testing, so always include debugging symbols 26TARGET_CFLAGS += -g 27 28# Enable position independence. 29TARGET_CFLAGS += -fpic 30 31# Disable double promotion warning for logging 32TARGET_CFLAGS += -Wno-double-promotion 33 34# x86 Shared Object Linker Flags ############################################### 35 36TARGET_SO_LDFLAGS += -shared 37TARGET_SO_LDFLAGS += -Wl,-gc-sections 38 39# Optimization Level ########################################################### 40 41TARGET_CFLAGS += -O$(OPT_LEVEL) 42 43# Variant Specific Sources ##################################################### 44 45TARGET_VARIANT_SRCS += $(X86_SRCS) 46