[Libreoffice-commits] core.git: external/skia

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 17 07:16:20 UTC 2020


 external/skia/UnpackedTarball_skia.mk                |    1 +
 external/skia/clang11-flax-vector-conversion.patch.0 |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit e0c70d42855a3bb479fc60c53a8e0758a31b075c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jan 16 18:52:16 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jan 17 08:15:46 2020 +0100

    For now, work around Clang 11 -flax-vector-conversion=integer in external/skia
    
    <https://github.com/llvm/llvm-project/commit/
    b72a8c65e4e34779b6bc9e466203f553f5294486> "PR17164: Change clang's default
    behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer"
    broke the build with
    
    > In file included from /data/sbergman/lo-clang/core/workdir/UnpackedTarball/skia/src/core/SkOpts.cpp:43:
    > /data/sbergman/lo-clang/core/workdir/UnpackedTarball/skia/src/opts/SkRasterPipeline_opts.h:713:26: error: no matching function for call to '_mm_and_ps'
    >         return _mm_or_ps(_mm_and_ps(c, t), _mm_andnot_ps(c, e));
    >                          ^~~~~~~~~~
    > /data/sbergman/llvm/inst/lib/clang/11.0.0/include/xmmintrin.h:404:1: note: candidate function not viable: no known conversion from 'sse2::I32' (aka 'V<int32_t>') to '__m128' (vector of 4 'float' values) for 1st argument
    > _mm_and_ps(__m128 __a, __m128 __b)
    > ^
    
    etc.  We could pass in -flax-vector-conversions=all on the compiler command line
    for Clang 11, but that option is not understood by older versions, so for now
    just disable the failing JUMPER_IS_SSE2/JUMPER_IS_SSE41 code paths.  Ultimately,
    the skia code will need to be fixed.
    
    Change-Id: If3202789f5f08bb40cf2ad8f6bcef5b5b3e462dd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86939
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 6ad0bdc455dc..4d38ba89d783 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -27,6 +27,7 @@ skia_patches := \
     fix-msvc.patch.1 \
     fix-gcc-x86.patch.1	\
     msvc-vectorcall-sse.patch.1 \
+    clang11-flax-vector-conversion.patch.0 \
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
 
diff --git a/external/skia/clang11-flax-vector-conversion.patch.0 b/external/skia/clang11-flax-vector-conversion.patch.0
new file mode 100644
index 000000000000..40cf4e0a4fd5
--- /dev/null
+++ b/external/skia/clang11-flax-vector-conversion.patch.0
@@ -0,0 +1,11 @@
+--- src/opts/SkRasterPipeline_opts.h
++++ src/opts/SkRasterPipeline_opts.h
+@@ -68,7 +68,7 @@
+ };
+ 
+ 
+-#if !defined(__clang__)
++#if !defined(__clang__) || __clang_major__ >= 11
+     #define JUMPER_IS_SCALAR
+ #elif defined(SK_ARM_HAS_NEON)
+     #define JUMPER_IS_NEON


More information about the Libreoffice-commits mailing list