Revert "Enable MAP_32BIT for macOS (#2992)" (#3032)

Revert "Do not use pagezero size option if osx version >= 13 (#3025)"
and  "Enable MAP_32BIT for macOS (#2992)".

Discussion: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3009
This commit is contained in:
YAMAMOTO Takashi
2024-01-18 10:22:09 +09:00
committed by GitHub
parent a9807058a6
commit d13a54f860
2 changed files with 2 additions and 25 deletions

View File

@ -473,14 +473,3 @@ else ()
# Disable quick aot/jit entries for interp and fast-jit
add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=0)
endif ()
if (APPLE)
EXEC_PROGRAM(sw_vers ARGS -productVersion OUTPUT_VARIABLE OS_X_VERSION)
STRING(REGEX MATCH "([0-9]+)" OS_X_VERSION ${OS_X_VERSION})
if (OS_X_VERSION LESS 13)
set(PAGE_ZERO_SIZE_OPTION "-Wl,-pagezero_size,0x4000")
endif ()
# On recent macOS versions, by default, the size of page zero is 4GB.
# Shrink it to make MAP_32BIT mmap can work.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PAGE_ZERO_SIZE_OPTION}")
endif ()