summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-19 21:23:51 +0100
committerMichael Stahl <mstahl@redhat.com>2018-01-22 20:08:05 +0100
commit61c88ae6945c241f5f2aeb844eeca0776b487132 (patch)
treee36c2dcfd7917a779e17e840071a836bcb944184 /solenv
parent0b1f8cb4a7eca3ab5b55c1866ef2761398d1ae95 (diff)
gbuild: always compile as C++17 with MSVC 2017
The current update MSVC 2017.5 supports fancy new C++ features, but unfortunately in its default C++14 mode it falls over and dies with an internal compiler error as soon as it sees the WeakImplHelper variadic template. In order to work around the ICE, build everything as C++17, which somehow doesn't crash. This causes loads of deprecation warnings about obsolete std::this and badly designed std::that, almost all of them from boost headers, which are well known for following every best practice in the C++ book. Liberally sprinkle macros around to suppress the warnings for now, like we already do with the other million warnings from boost headers. Change-Id: Ia6b6ef5e457b5fe3c8cfe361ba5da39376bb7c4c Reviewed-on: https://gerrit.libreoffice.org/48225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_MSC_defs.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 507264e1db89..b276f2d5329e 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -47,6 +47,8 @@ gb_COMPILERDEFS := \
-DBOOST_ERROR_CODE_HEADER_ONLY \
-DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE \
-DBOOST_SYSTEM_NO_DEPRECATED \
+ -D_HAS_AUTO_PTR_ETC \
+ -D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \
-D_CRT_NON_CONFORMING_SWPRINTFS \
-D_CRT_NONSTDC_NO_DEPRECATE \
-D_CRT_SECURE_NO_DEPRECATE \
@@ -163,6 +165,7 @@ endif
gb_CXXFLAGS := \
-utf-8 \
+ $(if $(filter-out 140,$(VCVER)),-std:c++17) \
-Gd \
-GR \
-Gs \