merge from dev

This commit is contained in:
daan 2021-12-15 08:35:15 -08:00
commit f24a0b1019
4 changed files with 6 additions and 6 deletions

View file

@ -115,7 +115,7 @@ jobs:
displayName: macOS displayName: macOS
pool: pool:
vmImage: vmImage:
macOS-10.14 macOS-latest
strategy: strategy:
matrix: matrix:
Debug: Debug:

View file

@ -1,8 +1,8 @@
include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake) include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake)
get_filename_component(MIMALLOC_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH) # one up from the cmake dir, e.g. /usr/local/lib/cmake/mimalloc-2.0 get_filename_component(MIMALLOC_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH) # one up from the cmake dir, e.g. /usr/local/lib/cmake/mimalloc-2.0
get_filename_component(MIMALLOC_VER_DIR "${CMAKE_CURRENT_LIST_DIR}" NAME) get_filename_component(MIMALLOC_VERSION_DIR "${CMAKE_CURRENT_LIST_DIR}" NAME)
string(REPLACE "/lib/cmake" "/lib" MIMALLOC_LIBRARY_DIR "${MIMALLOC_CMAKE_DIR}") string(REPLACE "/lib/cmake" "/lib" MIMALLOC_LIBRARY_DIR "${MIMALLOC_CMAKE_DIR}")
if("${MIMALLOC_VER_DIR}" EQUAL "mimalloc") if("${MIMALLOC_VERSION_DIR}" EQUAL "mimalloc")
# top level install # top level install
string(REPLACE "/lib/cmake" "/include" MIMALLOC_INCLUDE_DIR "${MIMALLOC_CMAKE_DIR}") string(REPLACE "/lib/cmake" "/include" MIMALLOC_INCLUDE_DIR "${MIMALLOC_CMAKE_DIR}")
set(MIMALLOC_OBJECT_DIR "${MIMALLOC_LIBRARY_DIR}") set(MIMALLOC_OBJECT_DIR "${MIMALLOC_LIBRARY_DIR}")

View file

@ -167,8 +167,8 @@ If we cannot get good randomness, we fall back to weak randomness based on a tim
#if defined(_WIN32) #if defined(_WIN32)
#if defined(MI_USE_BCRYPTGENRANDOM) #if !defined(MI_USE_RTLGENRANDOM)
// We would like to use BCryptGenRandom instead of RtlGenRandom but it can lead to a deadlock // We prefer to use BCryptGenRandom instead of RtlGenRandom but it can lead to a deadlock
// under the VS debugger when using dynamic overriding. // under the VS debugger when using dynamic overriding.
#pragma comment (lib,"bcrypt.lib") #pragma comment (lib,"bcrypt.lib")
#include <bcrypt.h> #include <bcrypt.h>

View file

@ -17,7 +17,7 @@ endif()
# Import mimalloc (if installed) # Import mimalloc (if installed)
find_package(mimalloc 2.0 REQUIRED NO_SYSTEM_ENVIRONMENT_PATH) find_package(mimalloc 2.0 REQUIRED NO_SYSTEM_ENVIRONMENT_PATH)
message(STATUS "Found mimalloc installed at: ${MIMALLOC_LIBRARY_DIR}") message(STATUS "Found mimalloc installed at: ${MIMALLOC_LIBRARY_DIR} (${MIMALLOC_VERSION_DIR})")
# overriding with a dynamic library # overriding with a dynamic library
add_executable(dynamic-override main-override.c) add_executable(dynamic-override main-override.c)