1 2include $(BUILD_SYSTEM)/clang/arm64.mk 3 4CLANG_CONFIG_arm64_TARGET_TRIPLE := aarch64-linux-android 5CLANG_CONFIG_arm64_TARGET_TOOLCHAIN_PREFIX := \ 6 $(TARGET_TOOLCHAIN_ROOT)/$(CLANG_CONFIG_arm64_TARGET_TRIPLE)/bin 7 8CLANG_CONFIG_arm64_TARGET_EXTRA_ASFLAGS := \ 9 $(CLANG_CONFIG_EXTRA_ASFLAGS) \ 10 $(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \ 11 $(CLANG_CONFIG_arm64_EXTRA_ASFLAGS) \ 12 -target $(CLANG_CONFIG_arm64_TARGET_TRIPLE) \ 13 -B$(CLANG_CONFIG_arm64_TARGET_TOOLCHAIN_PREFIX) 14 15CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS := \ 16 $(CLANG_CONFIG_EXTRA_CFLAGS) \ 17 $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ 18 $(CLANG_CONFIG_arm64_EXTRA_CFLAGS) \ 19 $(CLANG_CONFIG_arm64_TARGET_EXTRA_ASFLAGS) 20 21CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS := \ 22 $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ 23 $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ 24 $(CLANG_CONFIG_arm64_EXTRA_CONLYFLAGS) 25 26CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS := \ 27 $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ 28 $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ 29 $(CLANG_CONFIG_arm64_EXTRA_CPPFLAGS) \ 30 31CLANG_CONFIG_arm64_TARGET_EXTRA_LDFLAGS := \ 32 $(CLANG_CONFIG_EXTRA_LDFLAGS) \ 33 $(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \ 34 $(CLANG_CONFIG_arm64_EXTRA_LDFLAGS) \ 35 -target $(CLANG_CONFIG_arm64_TARGET_TRIPLE) \ 36 -B$(CLANG_CONFIG_arm64_TARGET_TOOLCHAIN_PREFIX) 37 38 39define convert-to-clang-flags 40 $(strip \ 41 $(call subst-clang-incompatible-arm64-flags,\ 42 $(filter-out $(CLANG_CONFIG_arm64_UNKNOWN_CFLAGS),\ 43 $(1)))) 44endef 45 46CLANG_TARGET_GLOBAL_CFLAGS := \ 47 $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ 48 $(CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS) 49 50CLANG_TARGET_GLOBAL_CONLYFLAGS := \ 51 $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ 52 $(CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS) 53 54CLANG_TARGET_GLOBAL_CPPFLAGS := \ 55 $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ 56 $(CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS) 57 58CLANG_TARGET_GLOBAL_LDFLAGS := \ 59 $(call convert-to-clang-flags,$(TARGET_GLOBAL_LDFLAGS)) \ 60 $(CLANG_CONFIG_arm64_TARGET_EXTRA_LDFLAGS) 61 62RS_TRIPLE := aarch64-linux-android 63RS_TRIPLE_CFLAGS := 64RS_COMPAT_TRIPLE := aarch64-linux-android 65 66TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-aarch64-android.a 67 68# Address sanitizer clang config 69ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan-arm64-android 70ADDRESS_SANITIZER_RPATH := /system/lib64/asan 71