OSDN Git Service

am 33053845: am 00227471: Merge "Don\'t clobber LOCAL_CFLAGS_arm64 in llvm-device...
[android-x86/external-llvm.git] / llvm-host-build.mk
index 4ab911b..a3c9539 100644 (file)
@@ -1,6 +1,8 @@
+# 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   \
@@ -11,7 +13,7 @@ LOCAL_CFLAGS +=       \
        -W      \
        -Wno-unused-parameter   \
        -Wwrite-strings \
-        -Dsprintf=sprintf \
+       -Dsprintf=sprintf \
        $(LOCAL_CFLAGS)
 
 ifeq ($(LLVM_ENABLE_ASSERTION),true)
@@ -45,9 +47,16 @@ LOCAL_C_INCLUDES :=  \
        $(LLVM_ROOT_PATH)       \
        $(LLVM_ROOT_PATH)/include       \
        $(LLVM_ROOT_PATH)/host/include  \
-        external/libcxx/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
 
 ###########################################################
@@ -56,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       \