platform_build/core/clang/TARGET_arm64.mk
Stephen Hines 1568029218 Add more support for GLOBAL_CONLYFLAGS.
This will be necessary to support -std=gnu99 mode for clang 3.6, which
defaults to C11 mode (unlike prior releases that use C99).

Change-Id: Iea84582f9f12ba76b988463cbc0a20bd61042538
2014-12-01 15:36:26 -08:00

64 lines
2 KiB
Makefile

include $(BUILD_SYSTEM)/clang/arm64.mk
CLANG_CONFIG_arm64_TARGET_TRIPLE := aarch64-linux-android
CLANG_CONFIG_arm64_TARGET_TOOLCHAIN_PREFIX := \
$(TARGET_TOOLCHAIN_ROOT)/$(CLANG_CONFIG_arm64_TARGET_TRIPLE)/bin
CLANG_CONFIG_arm64_TARGET_EXTRA_ASFLAGS := \
$(CLANG_CONFIG_EXTRA_ASFLAGS) \
$(CLANG_CONFIG_TARGET_EXTRA_ASFLAGS) \
$(CLANG_CONFIG_arm64_EXTRA_ASFLAGS) \
-target $(CLANG_CONFIG_arm64_TARGET_TRIPLE) \
-B$(CLANG_CONFIG_arm64_TARGET_TOOLCHAIN_PREFIX)
CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS := \
$(CLANG_CONFIG_EXTRA_CFLAGS) \
$(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \
$(CLANG_CONFIG_arm64_EXTRA_CFLAGS) \
$(CLANG_CONFIG_arm64_TARGET_EXTRA_ASFLAGS)
CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS := \
$(CLANG_CONFIG_EXTRA_CONLYFLAGS) \
$(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \
$(CLANG_CONFIG_arm64_EXTRA_CONLYFLAGS)
CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS := \
$(CLANG_CONFIG_EXTRA_CPPFLAGS) \
$(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \
$(CLANG_CONFIG_arm64_EXTRA_CPPFLAGS) \
CLANG_CONFIG_arm64_TARGET_EXTRA_LDFLAGS := \
$(CLANG_CONFIG_EXTRA_LDFLAGS) \
$(CLANG_CONFIG_TARGET_EXTRA_LDFLAGS) \
$(CLANG_CONFIG_arm64_EXTRA_LDFLAGS) \
-target $(CLANG_CONFIG_arm64_TARGET_TRIPLE) \
-B$(CLANG_CONFIG_arm64_TARGET_TOOLCHAIN_PREFIX)
define convert-to-clang-flags
$(strip \
$(call subst-clang-incompatible-arm64-flags,\
$(filter-out $(CLANG_CONFIG_arm64_UNKNOWN_CFLAGS),\
$(1))))
endef
CLANG_TARGET_GLOBAL_CFLAGS := \
$(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \
$(CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS)
CLANG_TARGET_GLOBAL_CONLYFLAGS := \
$(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \
$(CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS)
CLANG_TARGET_GLOBAL_CPPFLAGS := \
$(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \
$(CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS)
CLANG_TARGET_GLOBAL_LDFLAGS := \
$(call convert-to-clang-flags,$(TARGET_GLOBAL_LDFLAGS)) \
$(CLANG_CONFIG_arm64_TARGET_EXTRA_LDFLAGS)
RS_TRIPLE := aarch64-linux-android
RS_TRIPLE_CFLAGS :=
RS_COMPAT_TRIPLE := aarch64-linux-android