[libc-commits] [libc] Reland "[libc] build fix for sigsetjmp (#137047)" (PR #137214)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Tue Apr 29 00:59:18 PDT 2025
================
@@ -9,6 +9,16 @@
#ifndef LLVM_LIBC_TYPES_JMP_BUF_H
#define LLVM_LIBC_TYPES_JMP_BUF_H
+// TODO: implement sigjmp_buf related functions for other architectures
+// Issue: https://github.com/llvm/llvm-project/issues/136358
+#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
+#define __LIBC_HAS_SIGJMP_BUF
+#endif
----------------
petrhosek wrote:
I'd slightly prefer breaking this into two `#if` statements since that makes it somewhat easier to add more OSes and CPUs.
```suggestion
#if defined(__linux__)
#if defined(__i386__) || defined(__x86_64__)
#define __LIBC_HAS_SIGJMP_BUF
#endif
#endif
```
https://github.com/llvm/llvm-project/pull/137214
More information about the libc-commits
mailing list