Fix build with clang on s390x. (#3673)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This commit is contained in:
Piotr Sikora
2022-01-10 09:27:27 -06:00
committed by GitHub
parent 894a4d8301
commit 642102e699

View File

@@ -8,10 +8,10 @@
#define platform_longjmp(buf, arg) longjmp(buf, arg)
typedef jmp_buf platform_jmp_buf;
#elif defined(__clang__) && defined(__aarch64__)
#elif defined(__clang__) && (defined(__aarch64__) || defined(__s390x__))
// Clang on aarch64 doesn't support `__builtin_setjmp`, so use `sigsetjmp`
// from libc.
// Clang on aarch64 and s390x doesn't support `__builtin_setjmp`, so use
//`sigsetjmp` from libc.
//
// Note that `sigsetjmp` and `siglongjmp` are used here where possible to
// explicitly pass a 0 argument to `sigsetjmp` that we don't need to preserve