Skip to content

Commit fa398d4

Browse files
committed
pcre2: disable JIT for iOS
iOS forbids executable writable memory (W^X); the JIT path won't work in sandboxed apps.
1 parent fafb78e commit fa398d4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkgs/development/libraries/pcre2/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ stdenv.mkDerivation rec {
2323
"--enable-pcre2-16"
2424
"--enable-pcre2-32"
2525
# only enable jit on supported platforms which excludes Apple Silicon, see https://github.com/zherczeg/sljit/issues/51
26-
"--enable-jit=${if stdenv.hostPlatform.isS390x then "no" else "auto"}"
26+
# pthread_jit_write_protect_np is not available on iOS
27+
"--enable-jit=${if stdenv.hostPlatform.isS390x || stdenv.hostPlatform.isiOS then "no" else "auto"}"
2728
]
2829
# fix pcre jit in systemd units that set MemoryDenyWriteExecute=true like gitea
2930
++ lib.optional withJitSealloc "--enable-jit-sealloc";

0 commit comments

Comments
 (0)