aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2015-09-10 23:17:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-09-10 23:17:23 +0000
commitc389970618b0fd42a7689afc9cff529744c278ed (patch)
treed425591b617ed1834d57c9505f8e9adceeb305ce
parent7b2c68b1dbc77dccccc7907605ed195c0ee52de2 (diff)
parente6792b13fefbb72f292744e8681af66c337b8156 (diff)
downloadllvm-c389970618b0fd42a7689afc9cff529744c278ed.tar.gz
Merge "Clean up warning/error flags (especially for Windows)."
-rw-r--r--llvm-device-build.mk4
-rw-r--r--llvm-host-build.mk14
2 files changed, 13 insertions, 5 deletions
diff --git a/llvm-device-build.mk b/llvm-device-build.mk
index 4f2bc1c02307..627ad0cf5c2b 100644
--- a/llvm-device-build.mk
+++ b/llvm-device-build.mk
@@ -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.
diff --git a/llvm-host-build.mk b/llvm-host-build.mk
index d33128bd0f43..28463b53ca73 100644
--- a/llvm-host-build.mk
+++ b/llvm-host-build.mk
@@ -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 := \