solenv/gbuild/platform/com_MSC_defs.mk |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c9acad5dd1e09a85c9bec4e14f6d086623fdea71
Author:     Michael Stahl <[email protected]>
AuthorDate: Fri Jan 19 21:23:51 2018 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Mon Jan 31 19:01:39 2022 +0100

    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.
    
    Reviewed-on: https://gerrit.libreoffice.org/48225
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    
    Conflicts:
            solenv/gbuild/platform/com_MSC_defs.mk
    
    Change-Id: Ia6b6ef5e457b5fe3c8cfe361ba5da39376bb7c4c

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index 09a4ef6a2080..4118a666ceea 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -51,6 +51,7 @@ gb_COMPILERDEFS := \
        -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING \
        -D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \
        -D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING \
+       -D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \
        -D_CRT_NON_CONFORMING_SWPRINTFS \
        -D_CRT_NONSTDC_NO_DEPRECATE \
        -D_CRT_SECURE_NO_DEPRECATE \
@@ -167,6 +168,7 @@ endif
 gb_CXXFLAGS := \
        -utf-8 \
        $(CXXFLAGS_CXX11) \
+       $(if $(filter-out 140,$(VCVER)),-std:c++17) \
        -Gd \
        -GR \
        -Gs \

Reply via email to