OSDN Git Service

android: enable swrast w/o radeonsi build
[android-x86/external-llvm.git] / llvm-host-build.mk
index d33128b..c5ff646 100644 (file)
@@ -12,12 +12,19 @@ LOCAL_CFLAGS +=     \
        -Wall   \
        -W      \
        -Wno-unused-parameter   \
+       -Wno-maybe-uninitialized \
+       -Wno-missing-field-initializers \
        -Wwrite-strings \
+       -Werror \
        -Dsprintf=sprintf \
        $(LOCAL_CFLAGS)
 
-LOCAL_CFLAGS_linux += -Werror
-LOCAL_CFLAGS_darwin += -Werror -Wno-error=deprecated-declarations
+# Disable certain warnings for use with mingw.
+# We also must undefine WIN32_LEAN_AND_MEAN, since it is being passed globally
+# on the command line, and LLVM defines this internally itself.
+LOCAL_CFLAGS_windows += -Wno-array-bounds \
+                       -Wno-comment \
+                       -UWIN32_LEAN_AND_MEAN
 
 ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
 LOCAL_CFLAGS :=        \
@@ -41,10 +48,16 @@ endif
 
 LOCAL_CPPFLAGS :=      \
        $(LOCAL_CPPFLAGS)       \
-       -Woverloaded-virtual    \
        -Wno-sign-promo         \
        -std=c++11
 
+LOCAL_CPPFLAGS_linux := \
+       -Woverloaded-virtual
+
+LOCAL_CPPFLAGS_darwin += \
+       -Wno-deprecated-declarations \
+       -Woverloaded-virtual
+
 # Make sure bionic is first so we can include system headers.
 LOCAL_C_INCLUDES :=    \
        $(LLVM_ROOT_PATH)       \
@@ -62,8 +75,11 @@ LOCAL_IS_HOST_MODULE := true
 ifeq ($(HOST_PREFER_32_BIT),true)
 LOCAL_MULTILIB := 32
 else
+ifeq (libLLVM, $(filter libLLVM,$(LOCAL_SHARED_LIBRARIES)$(LOCAL_SHARED_LIBRARIES_$(HOST_OS))))
+# Skip building a 32-bit shared object if they are using libLLVM.
 LOCAL_MULTILIB := first
 endif
+endif
 
 ###########################################################
 ## Commands for running tblgen to compile a td file