Avoid usage of the clang::musttail attribute on ppc64le
Use of clang::musttail attribute is not supported by Clang on ppc64le
and needs avoided be removed in Skia. For more information, see:
- https://github.com/llvm/llvm-project/pull/93267
- https://github.com/llvm/llvm-project/issues/98859
- https://github.com/llvm/llvm-project/issues/108014
Based on a patch originally by Dan HorĂ¡k.
Change-Id: Ief165690211168437e7cb79209f16e5ce2e9972b
Reviewed-on: https://skia-review.googlesource.com/c/skcms/+/910656
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Adrian Perez de Castro <aperez@igalia.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
diff --git a/src/skcms_internals.h b/src/skcms_internals.h
index f3f0a2d..319c727 100644
--- a/src/skcms_internals.h
+++ b/src/skcms_internals.h
@@ -39,6 +39,8 @@
// - Clang 18 runs into an ICE on armv7/androideabi with [[clang::musttail]].
// (http://crbug.com/1504548)
// - Android RISC-V also runs into an ICE (b/314692534)
+ // - So does Linux ppc64le (https://github.com/llvm/llvm-project/issues/108014,
+ // https://github.com/llvm/llvm-project/issues/98859)
// - LoongArch developers indicate they had to turn it off
// - Windows builds generate incorrect code with [[clang::musttail]] and crash mysteriously.
// (http://crbug.com/1505442)
@@ -47,6 +49,7 @@
&& !defined(__EMSCRIPTEN__) \
&& !defined(__arm__) \
&& !defined(__riscv) \
+ && !defined(__powerpc__) \
&& !defined(__loongarch__) \
&& !defined(_WIN32) && !defined(__SYMBIAN32__)
#define SKCMS_HAS_MUSTTAIL 1