[Libreoffice-commits] core.git: 2 commits - shell/source solenv/gbuild
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 1 20:36:16 UTC 2019
shell/source/win32/spsupp/spsuppHelper.cxx | 2 ++
solenv/gbuild/platform/com_MSC_defs.mk | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 22267b7797340d1eb52ced10fe05afeb8a42fc2b
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Oct 1 14:21:17 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Oct 1 22:35:24 2019 +0200
When building with clang-cl, nevertheless use MSVC's CXXFLAGS_CXX11 for CLR
...which is built with MSVC after all. 0a99b5a1b7325454fe3d1174d44354888aa22012
"When building with clang-cl on Windows, build CLR code with MSVC" had happened
to get away with passing a bogus -Xclang -std=... (which cl then ignores)
instead of /std:c++17, but nowadays the build fails with things like
> [build CLR] cli_ure/source/climaker/climaker_app.cxx
[...]
> cl : Command line warning D9002 : ignoring unknown option '-Xclang'
> cl : Command line warning D9002 : ignoring unknown option '-std=gnu++2a'
> string_view is only available with C++17 or later.
> include\rtl/stringconcat.hxx(232): error C2429: attribute 'nodiscard' requires compiler flag '/std:c++17'
[...]
This is a bit of a hack, using hardcoded values for now. Ideally we would
capture MSVC's CXXFLAGS_CXX11 in an additional variable in configure.ac, and do
a subst from CXXFLAGS_CXX11 to MSVC's CXXFLAGS_CXX11 here.
Change-Id: Ifde367c7d1c3db57e75a6ccadc82d534bcb13d0a
Reviewed-on: https://gerrit.libreoffice.org/79961
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index f94ce967bced..8a3bda2cb6a2 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -282,7 +282,11 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
# When compiling for CLR, disable "warning C4339: use of undefined type detected
# in CLR meta-data - use of this type may lead to a runtime exception":
-gb_CXXCLRFLAGS := $(gb_CXXFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
+gb_CXXCLRFLAGS := \
+ $(if $(COM_IS_CLANG), \
+ $(patsubst -std=%,-std:c++17 -Zc:__cplusplus,$(gb_CXXFLAGS)), \
+ $(gb_CXXFLAGS)) \
+ $(gb_LinkTarget_EXCEPTIONFLAGS) \
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
-EHa \
-clr \
commit 5b4a9cd357bf5767e8dde36249f76631d6f4beca
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Oct 1 14:17:55 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Oct 1 22:35:11 2019 +0200
-Werror,-Wswitch (clang-cl)
Change-Id: I3d40104d6822ebb80ebec44b36bcdfa5c7e953ed
Reviewed-on: https://gerrit.libreoffice.org/79960
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/shell/source/win32/spsupp/spsuppHelper.cxx b/shell/source/win32/spsupp/spsuppHelper.cxx
index 0c4834f960e0..57b7c9a8cf86 100644
--- a/shell/source/win32/spsupp/spsuppHelper.cxx
+++ b/shell/source/win32/spsupp/spsuppHelper.cxx
@@ -184,6 +184,8 @@ int ViewDocument(LPCWSTR DocumentLocation, LPCWSTR OpenType, LPCWSTR varProgID)
{
case Answer::Cancel:
return 1;
+ case Answer::ReadOnly:
+ break;
case Answer::Edit:
return EditDocument(DocumentLocation, L"0", varProgID);
}
More information about the Libreoffice-commits
mailing list