diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b3fe721b..445ca241 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -115,7 +115,7 @@ jobs: displayName: macOS pool: vmImage: - macOS-10.14 + macOS-latest strategy: matrix: Debug: diff --git a/cmake/mimalloc-config.cmake b/cmake/mimalloc-config.cmake index 45d9692f..8a28e37e 100644 --- a/cmake/mimalloc-config.cmake +++ b/cmake/mimalloc-config.cmake @@ -1,8 +1,8 @@ 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_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}") -if("${MIMALLOC_VER_DIR}" EQUAL "mimalloc") +if("${MIMALLOC_VERSION_DIR}" EQUAL "mimalloc") # top level install string(REPLACE "/lib/cmake" "/include" MIMALLOC_INCLUDE_DIR "${MIMALLOC_CMAKE_DIR}") set(MIMALLOC_OBJECT_DIR "${MIMALLOC_LIBRARY_DIR}") diff --git a/src/random.c b/src/random.c index 1220401a..fabd6c6e 100644 --- a/src/random.c +++ b/src/random.c @@ -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(MI_USE_BCRYPTGENRANDOM) -// We would like to use BCryptGenRandom instead of RtlGenRandom but it can lead to a deadlock +#if !defined(MI_USE_RTLGENRANDOM) +// We prefer to use BCryptGenRandom instead of RtlGenRandom but it can lead to a deadlock // under the VS debugger when using dynamic overriding. #pragma comment (lib,"bcrypt.lib") #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 950ac274..bb8dc97e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # Import mimalloc (if installed) 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 add_executable(dynamic-override main-override.c)