OSDN Git Service

DO NOT MERGE increase generic_mips system partition am: 7824073a36 -s ours am: 0c041...
[android-x86/build.git] / core / clang / arm.mk
1 # Clang flags for arm arch, target or host.
2
3 CLANG_CONFIG_arm_EXTRA_ASFLAGS :=
4
5 CLANG_CONFIG_arm_EXTRA_CFLAGS :=
6
7 ifneq (,$(filter krait,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
8   # Android's clang support's krait as a CPU whereas GCC doesn't. Specify
9   # -mcpu here rather than the more normal core/combo/arch/arm/armv7-a-neon.mk.
10   CLANG_CONFIG_arm_EXTRA_CFLAGS += -mcpu=krait
11 endif
12
13 ifeq ($(HOST_OS),darwin)
14   # Darwin is really bad at dealing with idiv/sdiv. Don't use krait on Darwin.
15   CLANG_CONFIG_arm_EXTRA_CFLAGS += -mcpu=cortex-a9
16 endif
17
18 CLANG_CONFIG_arm_EXTRA_CPPFLAGS :=
19
20 CLANG_CONFIG_arm_EXTRA_LDFLAGS :=
21
22 # Include common unknown flags
23 CLANG_CONFIG_arm_UNKNOWN_CFLAGS := \
24   $(CLANG_CONFIG_UNKNOWN_CFLAGS) \
25   -mthumb-interwork \
26   -fgcse-after-reload \
27   -frerun-cse-after-loop \
28   -frename-registers \
29   -fno-align-jumps \
30   -fno-builtin-sin \
31   -fno-caller-saves \
32   -fno-early-inlining \
33   -fno-move-loop-invariants \
34   -fno-partial-inlining \
35   -fno-strict-volatile-bitfields \
36   -fno-tree-copy-prop \
37   -fno-tree-loop-optimize \
38   -Wa,--noexecstack
39
40 define subst-clang-incompatible-arm-flags
41   $(subst -march=armv5te,-march=armv5t,\
42   $(subst -march=armv5e,-march=armv5,\
43   $(1)))
44 endef