1 2 include $(BUILD_SYSTEM)/clang/x86_64.mk 3 4 CLANG_CONFIG_x86_64_TARGET_TRIPLE := x86_64-linux-android 5 CLANG_CONFIG_x86_64_TARGET_TOOLCHAIN_PREFIX := \ 6 $(TARGET_TOOLCHAIN_ROOT)/$(CLANG_CONFIG_x86_64_TARGET_TRIPLE)/bin 7 8 CLANG_CONFIG_x86_64_TARGET_EXTRA_ASFLAGS := \ 9 $(CLANG_CONFIG_EXTRA_ASFLAGS) \ 10 $(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \ 11 $(CLANG_CONFIG_x86_64_EXTRA_ASFLAGS) \ 12 -target $(CLANG_CONFIG_x86_64_TARGET_TRIPLE) \ 13 -B$(CLANG_CONFIG_x86_64_TARGET_TOOLCHAIN_PREFIX) 14 15 CLANG_CONFIG_x86_64_TARGET_EXTRA_CFLAGS := \ 16 $(CLANG_CONFIG_EXTRA_CFLAGS) \ 17 $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ 18 $(CLANG_CONFIG_x86_64_EXTRA_CFLAGS) \ 19 $(CLANG_CONFIG_x86_64_TARGET_EXTRA_ASFLAGS) 20 21 CLANG_CONFIG_x86_64_TARGET_EXTRA_CONLYFLAGS := \ 22 $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ 23 $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ 24 $(CLANG_CONFIG_x86_64_EXTRA_CONLYFLAGS) 25 26 CLANG_CONFIG_x86_64_TARGET_EXTRA_CPPFLAGS := \ 27 $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ 28 $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ 29 $(CLANG_CONFIG_x86_64_EXTRA_CPPFLAGS) \ 30 31 CLANG_CONFIG_x86_64_TARGET_EXTRA_LDFLAGS := \ 32 $(CLANG_CONFIG_EXTRA_LDFLAGS) \ 33 $(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \ 34 $(CLANG_CONFIG_x86_64_EXTRA_LDFLAGS) \ 35 -target $(CLANG_CONFIG_x86_64_TARGET_TRIPLE) \ 36 -B$(CLANG_CONFIG_x86_64_TARGET_TOOLCHAIN_PREFIX) 37 38 39 define convert-to-clang-flags 40 $(strip \ 41 $(call subst-clang-incompatible-x86_64-flags,\ 42 $(filter-out $(CLANG_CONFIG_x86_64_UNKNOWN_CFLAGS),\ 43 $(1)))) 44 endef 45 46 CLANG_TARGET_GLOBAL_CFLAGS := \ 47 $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ 48 $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CFLAGS) 49 50 CLANG_TARGET_GLOBAL_CONLYFLAGS := \ 51 $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ 52 $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CONLYFLAGS) 53 54 CLANG_TARGET_GLOBAL_CPPFLAGS := \ 55 $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ 56 $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CPPFLAGS) 57 58 CLANG_TARGET_GLOBAL_LDFLAGS := \ 59 $(call convert-to-clang-flags,$(TARGET_GLOBAL_LDFLAGS)) \ 60 $(CLANG_CONFIG_x86_64_TARGET_EXTRA_LDFLAGS) 61 62 RS_TRIPLE := aarch64-linux-android 63 RS_TRIPLE_CFLAGS := -D__x86_64__ 64 RS_COMPAT_TRIPLE := x86_64-linux-android 65 66 TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64-android.a 67