mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-26 21:04:27 +08:00
add separate MI_LIBC_MUSL option (issue #644)
This commit is contained in:
parent
336f83fbd1
commit
e46c1145a5
@ -19,6 +19,7 @@ option(MI_OSX_INTERPOSE "Use interpose to override standard malloc on macOS"
|
|||||||
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON)
|
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON)
|
||||||
option(MI_WIN_REDIRECT "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL" ON)
|
option(MI_WIN_REDIRECT "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL" ON)
|
||||||
option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF)
|
option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF)
|
||||||
|
option(MI_LIBC_MUSL "Set this when linking with musl libc" OFF)
|
||||||
option(MI_BUILD_SHARED "Build shared library" ON)
|
option(MI_BUILD_SHARED "Build shared library" ON)
|
||||||
option(MI_BUILD_STATIC "Build static library" ON)
|
option(MI_BUILD_STATIC "Build static library" ON)
|
||||||
option(MI_BUILD_OBJECT "Build object library" ON)
|
option(MI_BUILD_OBJECT "Build object library" ON)
|
||||||
@ -286,6 +287,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(MI_LIBC_MUSL)
|
||||||
|
message(STATUS "Assume using musl libc (MI_LIBC_MUSL=ON) (this implies MI_LOCAL_DYNAMIC_TLS=ON)")
|
||||||
|
set(MI_LOCAL_DYNAMIC_TLS "ON")
|
||||||
|
list(APPEND mi_defines MI_LIBC_MUSL=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
# On Haiku use `-DCMAKE_INSTALL_PREFIX` instead, issue #788
|
# On Haiku use `-DCMAKE_INSTALL_PREFIX` instead, issue #788
|
||||||
# if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
# if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
||||||
# SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib)
|
# SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user