2014-02-07 03:08:44 +01:00
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/clang/x86.mk
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_TRIPLE := i686-linux-android
|
2014-02-13 12:21:12 +01:00
|
|
|
# NOTE: There is no i686-linux-android prebuilt, so we must hardcode the
|
|
|
|
# x86_64 target instead.
|
2014-02-07 03:08:44 +01:00
|
|
|
CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX := \
|
2014-02-11 21:47:52 +01:00
|
|
|
$($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/x86_64-linux-android/bin
|
2014-02-07 03:08:44 +01:00
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_ASFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_ASFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_TARGET_TRIPLE) \
|
|
|
|
-B$(CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX)
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CFLAGS) \
|
2015-02-25 01:06:15 +01:00
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) \
|
|
|
|
-mstackrealign
|
|
|
|
|
|
|
|
# -mstackrealign is needed to realign stack in native code
|
|
|
|
# that could be called from JNI, so that movaps instruction
|
|
|
|
# will work on assumed stack aligned local variables.
|
2014-02-07 03:08:44 +01:00
|
|
|
|
2014-11-26 09:53:46 +01:00
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CONLYFLAGS)
|
|
|
|
|
2014-02-07 03:08:44 +01:00
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_CPPFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_CPPFLAGS) \
|
|
|
|
|
|
|
|
CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS := \
|
|
|
|
$(CLANG_CONFIG_EXTRA_LDFLAGS) \
|
|
|
|
$(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \
|
|
|
|
$(CLANG_CONFIG_x86_EXTRA_LDFLAGS) \
|
|
|
|
-target $(CLANG_CONFIG_x86_TARGET_TRIPLE) \
|
|
|
|
-B$(CLANG_CONFIG_x86_TARGET_TOOLCHAIN_PREFIX)
|
|
|
|
|
|
|
|
|
|
|
|
define $(clang_2nd_arch_prefix)convert-to-clang-flags
|
|
|
|
$(strip \
|
|
|
|
$(call subst-clang-incompatible-x86-flags,\
|
|
|
|
$(filter-out $(CLANG_CONFIG_x86_UNKNOWN_CFLAGS),\
|
|
|
|
$(1))))
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS)
|
|
|
|
|
2014-11-26 09:53:46 +01:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS)
|
|
|
|
|
2014-02-07 03:08:44 +01:00
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS)
|
|
|
|
|
|
|
|
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \
|
|
|
|
$(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \
|
|
|
|
$(CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS)
|
|
|
|
|
2014-08-29 23:43:53 +02:00
|
|
|
$(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi
|
|
|
|
$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := -D__i386__
|
2015-01-13 02:20:28 +01:00
|
|
|
$(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := i686-linux-android
|
2015-01-26 01:20:57 +01:00
|
|
|
|
|
|
|
$(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i686-android.a
|
2015-09-02 20:56:40 +02:00
|
|
|
|
|
|
|
# Address sanitizer clang config
|
|
|
|
$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan-i686-android
|
|
|
|
$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan
|