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 12 13include $(CHRE_PREFIX)/build/clang.mk 14 15# x86 Tools #################################################################### 16 17TARGET_AR = $(CLANG_TOOLCHAIN_PATH)/bin/llvm-ar 18TARGET_CC = $(CLANG_TOOLCHAIN_PATH)/bin/clang++ 19TARGET_LD = $(CLANG_TOOLCHAIN_PATH)/bin/clang++ 20 21# x86 Compiler Flags ########################################################### 22 23# Add x86 compiler flags. 24TARGET_CFLAGS += $(X86_CFLAGS) 25 26# x86 is purely used for testing, so always include debugging symbols 27TARGET_CFLAGS += -g 28 29# Enable position independence. 30TARGET_CFLAGS += -fpic 31 32# Disable double promotion warning for logging 33TARGET_CFLAGS += -Wno-double-promotion 34 35# x86 Shared Object Linker Flags ############################################### 36 37TARGET_SO_LDFLAGS += -shared 38TARGET_SO_LDFLAGS += -Wl,-gc-sections 39 40# Optimization Level ########################################################### 41 42TARGET_CFLAGS += -O$(OPT_LEVEL) 43 44# Variant Specific Sources ##################################################### 45 46TARGET_VARIANT_SRCS += $(X86_SRCS) 47