add mmap() MAP_JIT flag on Darwin for macOS Hardened Runtime

Closed Bitbucket Importer requested to merge topic/default/bitbucket-pr-635 into branch/default

Created originally on Bitbucket by lunixbochs (Ryan Hileman)

This allows PyPy to be codesigned with Hardened Runtime on macOS Mojave with com.apple.security.cs.allow-jit instead of com.apple.security.cs.allow-unsigned-executable-memory by mapping executable pages using the MAP_JIT flag to mmap. I’ve confirmed this flag exists at least back to 10.11 (El Capitan). I don’t know exactly how these defines get codegen'd so I’m not sure if I handled the linux/windows compilation case correctly.

Merge request reports