OSDN Git Service

Clean up warning/error flags (especially for Windows).
authorStephen Hines <srhines@google.com>
Thu, 10 Sep 2015 18:23:42 +0000 (11:23 -0700)
committerStephen Hines <srhines@google.com>
Thu, 10 Sep 2015 23:04:23 +0000 (16:04 -0700)
Change-Id: Ib31d461ec584827eb1dc96d47861499139517f36

llvm-device-build.mk
llvm-host-build.mk

index 4f2bc1c..627ad0c 100644 (file)
@@ -13,12 +13,10 @@ LOCAL_CFLAGS :=     \
        -W      \
        -Wno-unused-parameter   \
        -Wwrite-strings \
+       -Werror \
         -Dsprintf=sprintf \
        $(LOCAL_CFLAGS)
 
-LOCAL_CFLAGS_linux += -Werror
-LOCAL_CFLAGS_darwin += -Werror
-
 # The three inline options together reduce libbcc.so almost 1MB.
 # We move them from global build/core/combo/TARGET_linux-arm.mk
 # to here.
index d33128b..28463b5 100644 (file)
@@ -12,12 +12,22 @@ 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
+LOCAL_CFLAGS_darwin += -Wno-error=deprecated-declarations
+
+# Disable certain warnings as errors 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-error=array-bounds \
+                       -Wno-error=comment \
+                       -Wno-error=return-type \
+                       -UWIN32_LEAN_AND_MEAN
 
 ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
 LOCAL_CFLAGS :=        \