MemoryUtil: Remove __builtin_available for macOS 10.14

This commit is contained in:
OatmealDome 2022-06-01 22:51:10 -04:00
parent 6e2febd404
commit 1cb3058abe

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)