1 2include $(BUILD_SYSTEM)/clang/arm.mk 3 4CLANG_CONFIG_arm_TARGET_TRIPLE := arm-linux-androideabi 5CLANG_CONFIG_arm_TARGET_TOOLCHAIN_PREFIX := \ 6 $($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/$(CLANG_CONFIG_arm_TARGET_TRIPLE)/bin 7 8CLANG_CONFIG_arm_TARGET_EXTRA_ASFLAGS := \ 9 $(CLANG_CONFIG_EXTRA_ASFLAGS) \ 10 $(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \ 11 $(CLANG_CONFIG_arm_EXTRA_ASFLAGS) \ 12 -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) \ 13 -B$(CLANG_CONFIG_arm_TARGET_TOOLCHAIN_PREFIX) 14 15CLANG_CONFIG_arm_TARGET_EXTRA_CFLAGS := \ 16 $(CLANG_CONFIG_EXTRA_CFLAGS) \ 17 $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ 18 $(CLANG_CONFIG_arm_EXTRA_CFLAGS) \ 19 -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) \ 20 $(CLANG_CONFIG_arm_TARGET_EXTRA_ASFLAGS) 21 22CLANG_CONFIG_arm_TARGET_EXTRA_CONLYFLAGS := \ 23 $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ 24 $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ 25 $(CLANG_CONFIG_arm_EXTRA_CONLYFLAGS) 26 27CLANG_CONFIG_arm_TARGET_EXTRA_CPPFLAGS := \ 28 $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ 29 $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ 30 $(CLANG_CONFIG_arm_EXTRA_CPPFLAGS) \ 31 -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) 32 33CLANG_CONFIG_arm_TARGET_EXTRA_LDFLAGS := \ 34 $(CLANG_CONFIG_EXTRA_LDFLAGS) \ 35 $(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \ 36 $(CLANG_CONFIG_arm_EXTRA_LDFLAGS) \ 37 -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) \ 38 -B$(CLANG_CONFIG_arm_TARGET_TOOLCHAIN_PREFIX) 39 40 41define $(clang_2nd_arch_prefix)convert-to-clang-flags 42 $(strip \ 43 $(call subst-clang-incompatible-arm-flags,\ 44 $(filter-out $(CLANG_CONFIG_arm_UNKNOWN_CFLAGS),\ 45 $(1)))) 46endef 47 48$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ 49 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ 50 $(CLANG_CONFIG_arm_TARGET_EXTRA_CFLAGS) 51 52$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ 53 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ 54 $(CLANG_CONFIG_arm_TARGET_EXTRA_CONLYFLAGS) 55 56$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ 57 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ 58 $(CLANG_CONFIG_arm_TARGET_EXTRA_CPPFLAGS) 59 60$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ 61 $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \ 62 $(CLANG_CONFIG_arm_TARGET_EXTRA_LDFLAGS) 63 64$(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi 65$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := 66$(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := armv7-none-linux-gnueabi 67 68$(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-arm-android.a 69 70# Address sanitizer clang config 71$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan-arm-android 72$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_RPATH := /system/lib/asan 73