summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorlbenes <lukebenes@hotmail.com>2018-08-22 22:55:17 -0400
committerStephan Bergmann <sbergman@redhat.com>2018-08-24 08:39:59 +0200
commit4ea15845447788f9b9a1ec7dbde5a7bf3671764d (patch)
treeb7402eea9849b3ed5823c9955d064dd055188aa5 /solenv
parent9897fd1c4715e7dbbe99fae2b82c2eda1d2b6f7e (diff)
Fix MSVC 2017 warning C4702: unreachable code
This appeared on x86 release build here: http://document-foundation-mail-archive.969070.n3.nabble.com/Windows-32-bit-build-failure-unreachable-code-tp4243848.html And on x86-64 release builds here: http://document-foundation-mail-archive.969070.n3.nabble.com/64-bit-Windows-build-failure-after-MSVC-Update-tp4246816.html This is most likely a compiler bug / false positive. Change-Id: Ia5502eedf079051d35eb24fca10f6804029789be Reviewed-on: https://gerrit.libreoffice.org/59480 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_MSC.mk5
-rw-r--r--solenv/gbuild/platform/com_MSC_defs.mk5
2 files changed, 5 insertions, 5 deletions
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 04484f007413..704c7f7817dc 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -22,11 +22,6 @@ gb_CPUDEFS := -D_X86_=1
include $(GBUILDDIR)/platform/com_MSC_defs.mk
-# Work around MSVC 2017 compiler bug (see comments at <https://gerrit.libreoffice.org/#/c/57472/>
-# "Fix Win32 warning C4702: unreachable code":
-gb_CXXFLAGS += \
- $(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4702) \
-
include $(GBUILDDIR)/platform/com_MSC_class.mk
# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 0bfb76609cd1..3791ccac65d6 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -209,8 +209,13 @@ endif
ifneq ($(COM_IS_CLANG),TRUE)
+# clang-cl doesn't support -Wv:18 for now
+# Work around MSVC 2017 C4702 compiler bug with release builds
+# http://document-foundation-mail-archive.969070.n3.nabble.com/Windows-32-bit-build-failure-unreachable-code-tp4243848.html
+# http://document-foundation-mail-archive.969070.n3.nabble.com/64-bit-Windows-build-failure-after-MSVC-Update-tp4246816.html
gb_CXXFLAGS += \
-Wv:18 \
+ $(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4702) \
endif