summaryrefslogtreecommitdiff
path: root/thirdparty/pcre2/src
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-05-18 11:41:00 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-05-18 11:41:09 +0200
commit24a06a6d4ab32116a15d0bb5ae7cc3c359be672c (patch)
tree50862fc82ea1a96021309fafc9dcfc81f7140741 /thirdparty/pcre2/src
parent5631b59e218f4883442382c097eed10ed76b3c8d (diff)
pcre2: Fix support for macOS < 11.0 by making JIT conditional at runtime
Diffstat (limited to 'thirdparty/pcre2/src')
-rw-r--r--thirdparty/pcre2/src/sljit/sljitExecAllocator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
index 92d940ddc2..6359848cd5 100644
--- a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
+++ b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
@@ -152,6 +152,9 @@ static SLJIT_INLINE void apple_update_wx_flags(sljit_s32 enable_exec)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
pthread_jit_write_protect_np(enable_exec);
+#elif defined(__clang__)
+ if (__builtin_available(macOS 11.0, *))
+ pthread_jit_write_protect_np(enable_exec);
#else
#error "Must target Big Sur or newer"
#endif /* BigSur */