OSDN Git Service

Fix AsmParser's spacing.
[android-x86/external-llvm.git] / llvm-device-build.mk
1 LOCAL_CFLAGS := \
2         -D_GNU_SOURCE   \
3         -D__STDC_LIMIT_MACROS   \
4         -D__STDC_CONSTANT_MACROS        \
5         -O2     \
6         -fomit-frame-pointer    \
7         -Wall   \
8         -W      \
9         -Wno-unused-parameter   \
10         -Wwrite-strings \
11         $(LOCAL_CFLAGS)
12
13 # The three inline options together reduce libbcc.so almost 1MB.
14 # We move them from global build/core/combo/TARGET_linux-arm.mk
15 # to here.
16 LOCAL_CFLAGS := -DANDROID_TARGET_BUILD \
17                 -finline-limit=64 \
18                 -finline-functions \
19                 -fno-inline-functions-called-once \
20                 $(LOCAL_CFLAGS)
21
22 ifeq ($(LLVM_ENABLE_ASSERTION),true)
23 LOCAL_CFLAGS := \
24         -D_DEBUG        \
25         -UNDEBUG        \
26         $(LOCAL_CFLAGS)
27 endif
28
29 ifneq ($(REQUIRES_EH),1)
30 LOCAL_CFLAGS += -fno-exceptions
31 else
32 # No action. The device target should not have exception enabled since bionic
33 # doesn't support it
34 REQUIRES_EH := 0
35 endif
36
37 ifneq ($(REQUIRES_RTTI),1)
38 LOCAL_CPPFLAGS +=       -fno-rtti
39 else
40 REQUIRES_RTTI := 0
41 endif
42
43 LOCAL_CPPFLAGS :=       \
44         $(LOCAL_CPPFLAGS)       \
45         -Woverloaded-virtual    \
46         -Wno-sign-promo   
47
48 # Make sure bionic is first so we can include system headers.
49 LOCAL_C_INCLUDES :=     \
50         bionic \
51         external/stlport/stlport \
52         $(LLVM_ROOT_PATH)       \
53         $(LLVM_ROOT_PATH)/include       \
54         $(LLVM_ROOT_PATH)/device/include        \
55         $(LOCAL_C_INCLUDES)
56
57 ###########################################################
58 ## Commands for running tblgen to compile a td file
59 ###########################################################
60 define transform-device-td-to-out
61 @mkdir -p $(dir $@)
62 @echo "Device TableGen (gen-$(1)): $(LOCAL_MODULE) <= $<"
63 $(hide) $(TBLGEN) \
64         -I $(dir $<)    \
65         -I $(LLVM_ROOT_PATH)/include    \
66         -I $(LLVM_ROOT_PATH)/device/include     \
67         -I $(LLVM_ROOT_PATH)/lib/Target \
68     -gen-$(strip $(1)) \
69     -o $@ $<
70 endef