Merge pull request #10714 from OatmealDome/macos-mojave-bump

BuildMacOSUniversalBinary: Bump minimum macOS to 10.14
This commit is contained in:
Mai M
2022-06-02 20:20:52 -04:00
committed by GitHub
6 changed files with 8 additions and 63 deletions

View File

@ -41,11 +41,7 @@ void* AllocateExecutableMemory(size_t size)
#else
int map_flags = MAP_ANON | MAP_PRIVATE;
#if defined(__APPLE__)
// This check is in place to prepare for x86_64 MAP_JIT support. While MAP_JIT did exist
// prior to 10.14, it had restrictions on the number of JIT allocations that were removed
// in 10.14.
if (__builtin_available(macOS 10.14, *))
map_flags |= MAP_JIT;
map_flags |= MAP_JIT;
#endif
void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE | PROT_EXEC, map_flags, -1, 0);
if (ptr == MAP_FAILED)