mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
small fixes for macOS
This commit is contained in:
parent
d5ed0cc71e
commit
351cb0c740
3 changed files with 18 additions and 14 deletions
|
@ -330,20 +330,18 @@ endif()
|
|||
|
||||
# Determine architecture
|
||||
set(MI_OPT_ARCH_FLAGS "")
|
||||
set(MI_ARCH "unknown")
|
||||
if(APPLE)
|
||||
list(FIND CMAKE_OSX_ARCHITECTURES "x86_64" x64_index)
|
||||
list(FIND CMAKE_OSX_ARCHITECTURES "arm64" arm64_index)
|
||||
if(x64_index GREATER_EQUAL 0)
|
||||
set(MI_ARCH "x64")
|
||||
elseif(arm64_index GREATER_EQUAL 0)
|
||||
set(MI_ARCH "arm64")
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
|
||||
set(MI_ARCH "")
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
|
||||
CMAKE_GENERATOR_PLATFORM STREQUAL "x64") # msvc
|
||||
set(MI_ARCH "x64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR # apple
|
||||
CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") # msvc
|
||||
set(MI_ARCH "arm64")
|
||||
endif()
|
||||
if(MI_ARCH)
|
||||
message(STATUS "Architecture: ${MI_ARCH}")
|
||||
endif()
|
||||
|
||||
# Check /proc/cpuinfo for an SV39 MMU and limit the virtual address bits.
|
||||
# (this will skip the aligned hinting in that case. Issue #939, #949)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue