config_host.mk.in | 1 + configure.ac | 6 ++++-- external/skia/Library_skia.mk | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-)
New commits: commit 9bbed2130708aa28d8650394cf112b5932224059 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Aug 2 13:30:57 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Aug 2 15:21:48 2023 +0200 external/skia: Avoid -std:c++20 with known-broken VS-provided clang-cl ...as witnessed with patch set 1 of <https://gerrit.libreoffice.org/c/core/+/155121/1> "Bump baseline to C++20", > In file included from C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/skia/src/base/SkBezierCurves.cpp:8: > In file included from C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/skia\src/base/SkBezierCurves.h:10: > C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/skia\include/private/base/SkSpan_impl.h(122,1): error: C++ requires a type specifier for all declarations > SkSpan(Container&&) -> > ^ > C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/skia/src/base/SkBezierCurves.cpp(185,12): error: use of class template 'SkSpan' requires template arguments > return SkSpan{intersectionStorage, intersectionCount}; > ^ > C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/skia\include/private/base/SkSpan_impl.h(64,7): note: template is declared here > class SkSpan { > ^ etc. (<https://ci.libreoffice.org/job/gerrit_windows/160027/>) Change-Id: I6166f1cb49ac1540ec1c4d3bc3331c8b228efa27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155228 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/config_host.mk.in b/config_host.mk.in index 85089efb254e..8b345a690eff 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -456,6 +456,7 @@ export LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F=@LO_CLANG_CXXFLAGS_INTRINSICS_AVX512 export LO_CLANG_CXXFLAGS_INTRINSICS_F16C=@LO_CLANG_CXXFLAGS_INTRINSICS_F16C@ export LO_CLANG_CXXFLAGS_INTRINSICS_FMA=@LO_CLANG_CXXFLAGS_INTRINSICS_FMA@ export LO_CLANG_SHOWINCLUDES_PREFIX=@LO_CLANG_SHOWINCLUDES_PREFIX@ +export LO_CLANG_VERSION=@LO_CLANG_VERSION@ @x_LO_ELFCHECK_ALLOWLIST@ export LO_ELFCHECK_ALLOWLIST=@LO_ELFCHECK_ALLOWLIST@ @x_Cygwin@ export LS=@WIN_LS@ export MACOSX_BUNDLE_IDENTIFIER=@MACOSX_BUNDLE_IDENTIFIER@ diff --git a/configure.ac b/configure.ac index 7e60bd70cc02..e7beaf945fb7 100644 --- a/configure.ac +++ b/configure.ac @@ -12256,6 +12256,7 @@ LO_CLANG_CXXFLAGS_INTRINSICS_AVX512= LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F= LO_CLANG_CXXFLAGS_INTRINSICS_F16C= LO_CLANG_CXXFLAGS_INTRINSICS_FMA= +LO_CLANG_VERSION= HAVE_LO_CLANG_DLLEXPORTINLINES= if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != TRUE; then @@ -12298,8 +12299,8 @@ if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != TRUE; then fi if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then clang2_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $LO_CLANG_CC -E - | tail -1 | sed 's/ //g'` - clang2_ver=`echo "$clang2_version" | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'` - if test "$clang2_ver" -lt 50002; then + LO_CLANG_VERSION=`echo "$clang2_version" | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'` + if test "$LO_CLANG_VERSION" -lt 50002; then AC_MSG_WARN(["$clang2_version" is too old or unrecognized, must be at least Clang 5.0.2]) LO_CLANG_CC= LO_CLANG_CXX= @@ -12599,6 +12600,7 @@ AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F) AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_F16C) AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_FMA) AC_SUBST(LO_CLANG_SHOWINCLUDES_PREFIX) +AC_SUBST(LO_CLANG_VERSION) AC_SUBST(CLANG_USE_LD) AC_SUBST([HAVE_LO_CLANG_DLLEXPORTINLINES]) diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 77e674a0b5e2..c2163d299327 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -50,6 +50,15 @@ $(eval $(call gb_Library_add_cxxflags,skia, \ )) endif +# The clang-cl provided with at least VS 2019 16.11.28 is known-broken with -std:c++20: +ifneq ($(filter -std:c++20,$(CXXFLAGS_CXX11)),) +ifeq ($(LO_CLANG_VERSION),120000) +$(eval $(call gb_Library_add_cxxflags,skia, \ + -std:c++17 \ +)) +endif +endif + $(eval $(call gb_Library_use_system_win32_libs,skia,\ fontsub \ ole32 \