summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-04 17:08:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-03-04 17:08:08 +0100
commit9055fb48402eaeb9ba876b7893e2f9a39fea06b1 (patch)
tree42be3cc7c12f4cd60da0ec0e6cc39609f68f47ef /solenv
parentaf662f323d864e47d6218a2a63700e13b6e907fa (diff)
clang-cl: Enable more warnings etc. (like in the Clang/GCC case)
Change-Id: Ia1fb09b89d3ccc3c7f4a11799f0d8eac99c6c7a9
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk4
-rw-r--r--solenv/gbuild/platform/com_MSC_defs.mk18
2 files changed, 20 insertions, 2 deletions
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 93645a145638..e7b5f5cbb049 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -42,9 +42,9 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), \
$(if $(filter %.c,$(3)), $(gb_CC), $(gb_CXX))) \
$(DEFS) \
- $(if $(EXTERNAL_CODE),,$(gb_DEFS_INTERNAL)) \
$(gb_LTOFLAGS) \
$(2) \
+ $(if $(EXTERNAL_CODE),$(if $(COM_IS_CLANG),-Wno-undef),$(gb_DEFS_INTERNAL)) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-Fd$(PDBFILE) \
$(PCHFLAGS) \
@@ -79,7 +79,7 @@ $(call gb_Helper_abbreviate_dirs,\
unset INCLUDE && \
$(gb_CXX) \
$(4) $(5) -Fd$(PDBFILE) \
- $(if $(EXTERNAL_CODE),,$(gb_DEFS_INTERNAL)) \
+ $(if $(EXTERNAL_CODE),$(if $(COM_IS_CLANG),-Wno-undef),$(gb_DEFS_INTERNAL)) \
$(gb_LTOFLAGS) \
$(gb_COMPILERDEPFLAGS) \
-I$(dir $(3)) \
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index dbe46b69419d..5a3c0433779d 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -166,6 +166,17 @@ gb_CFLAGS := \
-Zc:wchar_t- \
$(if $(filter-out 120,$(VCVER)), -Wv:18) \
+ifeq ($(COM_IS_CLANG),TRUE)
+gb_CFLAGS += \
+ -Wdeclaration-after-statement \
+ -Wendif-labels \
+ -Wshadow \
+ -Wstrict-prototypes \
+ -Wundef \
+ -Wunused-macros \
+
+endif
+
gb_CXXFLAGS := \
-Gd \
-GR \
@@ -215,7 +226,14 @@ endif
ifeq ($(COM_IS_CLANG),TRUE)
gb_CXXFLAGS += \
+ -Wendif-labels \
+ -Wno-missing-braces \
-Wno-missing-braces \
+ -Wnon-virtual-dtor \
+ -Woverloaded-virtual \
+ -Wshadow \
+ -Wundef \
+ -Wunused-macros \
endif