mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 23:39:31 +03:00
add cmake option to fall back on the fiber api do detect thread termination on windows
This commit is contained in:
parent
aa881733d7
commit
4377abe017
1 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,7 @@ option(MI_NO_THP "Disable transparent huge pages support on Linux/And
|
||||||
option(MI_EXTRA_CPPDEFS "Extra pre-processor definitions (use as `-DMI_EXTRA_CPPDEFS=\"opt1=val1;opt2=val2\"`)" "")
|
option(MI_EXTRA_CPPDEFS "Extra pre-processor definitions (use as `-DMI_EXTRA_CPPDEFS=\"opt1=val1;opt2=val2\"`)" "")
|
||||||
|
|
||||||
# deprecated options
|
# deprecated options
|
||||||
|
option(MI_WIN_USE_FLS "Use Fiber local storage on Windows to detect thread termination" OFF)
|
||||||
option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)" OFF)
|
option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)" OFF)
|
||||||
option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" OFF)
|
option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" OFF)
|
||||||
|
|
||||||
|
@ -313,6 +314,11 @@ if(MI_LIBC_MUSL)
|
||||||
list(APPEND mi_defines MI_LIBC_MUSL=1)
|
list(APPEND mi_defines MI_LIBC_MUSL=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(MI_WIN_USE_FLS)
|
||||||
|
message(STATUS "Use the Fiber API to detect thread termination")
|
||||||
|
list(APPEND mi_defines MI_WIN_USE_FLS=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…
Add table
Reference in a new issue