OSDN Git Service

Merge "[LIT] Add JSONMetricValue type to wrap types supported by the json encoder."
[android-x86/external-llvm.git] / llvm-host-build.mk
index 9fd7435..a3c9539 100644 (file)
@@ -1,14 +1,19 @@
-LOCAL_CFLAGS :=        \
+# Windows can't use Clang to build yet
+ifneq ($(HOST_OS),windows)
+LOCAL_CLANG := true
+include external/libcxx/libcxx.mk
+endif
+
+LOCAL_CFLAGS +=        \
        -D_GNU_SOURCE   \
        -D__STDC_LIMIT_MACROS   \
-       -D__STDC_CONSTANT_MACROS        \
-       -D__STDC_FORMAT_MACROS  \
        -O2     \
        -fomit-frame-pointer    \
        -Wall   \
        -W      \
        -Wno-unused-parameter   \
        -Wwrite-strings \
+       -Dsprintf=sprintf \
        $(LOCAL_CFLAGS)
 
 ifeq ($(LLVM_ENABLE_ASSERTION),true)
@@ -34,7 +39,8 @@ endif
 LOCAL_CPPFLAGS :=      \
        $(LOCAL_CPPFLAGS)       \
        -Woverloaded-virtual    \
-       -Wno-sign-promo
+       -Wno-sign-promo         \
+       -std=c++11
 
 # Make sure bionic is first so we can include system headers.
 LOCAL_C_INCLUDES :=    \
@@ -43,6 +49,14 @@ LOCAL_C_INCLUDES :=  \
        $(LLVM_ROOT_PATH)/host/include  \
        $(LOCAL_C_INCLUDES)
 
+# Add on ncurses to have support for terminfo
+ifneq ($(HOST_OS),windows)
+LOCAL_LDLIBS += -lncurses
+ifneq ($(HOST_OS),darwin)
+LOCAL_LDLIBS += -lgcc_s
+endif
+endif
+
 LOCAL_IS_HOST_MODULE := true
 
 ###########################################################
@@ -51,7 +65,7 @@ LOCAL_IS_HOST_MODULE := true
 define transform-host-td-to-out
 @mkdir -p $(dir $@)
 @echo "Host TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
-$(hide) $(TBLGEN) \
+$(hide) $(LLVM_TBLGEN) \
        -I $(dir $<)    \
        -I $(LLVM_ROOT_PATH)/include    \
        -I $(LLVM_ROOT_PATH)/host/include       \