mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 09:28:07 +08:00
[mimalloc] update to v1.7.2 (#20188)
* [mimalloc] update to v1.7.2 * update version * update suggestion review * update version * update patch EOF * update version
This commit is contained in:
parent
ccd2cf07cf
commit
6edc46f862
@ -1,58 +1,38 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 37616eb..4c81e6a 100644
|
index b56953c..d7ad3e7 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -251,14 +251,28 @@ if(MI_BUILD_SHARED)
|
@@ -279,10 +279,12 @@ if(MI_BUILD_SHARED)
|
||||||
)
|
|
||||||
if(WIN32)
|
|
||||||
# On windows copy the mimalloc redirection dll too.
|
|
||||||
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
||||||
target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect.lib)
|
|
||||||
add_custom_command(TARGET mimalloc POST_BUILD
|
add_custom_command(TARGET mimalloc POST_BUILD
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect.dll" $<TARGET_FILE_DIR:mimalloc>
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $<TARGET_FILE_DIR:mimalloc>
|
||||||
COMMENT "Copy mimalloc-redirect.dll to output directory")
|
COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory")
|
||||||
- endif()
|
|
||||||
+ install (
|
+ install (
|
||||||
+ FILES $<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect.dll
|
+ FILES $<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll
|
||||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
+ )
|
+ )
|
||||||
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
endif()
|
||||||
+ target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect32.lib)
|
-
|
||||||
+ add_custom_command(TARGET mimalloc POST_BUILD
|
- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
||||||
+ COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect32.dll" $<TARGET_FILE_DIR:mimalloc>
|
- install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
|
||||||
+ COMMENT "Copy mimalloc-redirect32.dll to output directory")
|
|
||||||
+ install (
|
|
||||||
+ FILES $<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect32.dll
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
+ )
|
|
||||||
+ endif()
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_dir} LIBRARY)
|
|
||||||
- install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake)
|
|
||||||
+ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP)
|
+ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# static library
|
# static library
|
||||||
@@ -281,9 +295,11 @@ if (MI_BUILD_STATIC)
|
@@ -308,6 +310,8 @@ if (MI_BUILD_STATIC)
|
||||||
set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename})
|
install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
||||||
endif()
|
|
||||||
|
|
||||||
- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_dir})
|
|
||||||
+ install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
+install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake)
|
+install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
|
||||||
+
|
+
|
||||||
# install include files
|
# install include files
|
||||||
install(FILES include/mimalloc.h DESTINATION ${mi_install_dir}/include)
|
install(FILES include/mimalloc.h DESTINATION ${mi_install_incdir})
|
||||||
install(FILES include/mimalloc-override.h DESTINATION ${mi_install_dir}/include)
|
install(FILES include/mimalloc-override.h DESTINATION ${mi_install_incdir})
|
||||||
@@ -315,9 +331,6 @@ if (MI_BUILD_OBJECT)
|
@@ -342,9 +346,6 @@ if (MI_BUILD_OBJECT)
|
||||||
|
|
||||||
# the FILES expression can also be: $<TARGET_OBJECTS:mimalloc-obj>
|
# the FILES expression can also be: $<TARGET_OBJECTS:mimalloc-obj>
|
||||||
# but that fails cmake versions less than 3.10 so we leave it as is for now
|
# but that fails cmake versions less than 3.10 so we leave it as is for now
|
||||||
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}
|
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}
|
||||||
- DESTINATION ${mi_install_dir}
|
- DESTINATION ${mi_install_libdir}
|
||||||
- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} )
|
- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -3,23 +3,24 @@ vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp")
|
|||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO microsoft/mimalloc
|
REPO microsoft/mimalloc
|
||||||
REF a9686d6ecf00e4467e772f7c0b4ef76a15f325f6 # v1.6.4
|
REF 752594e76423526e108413731518a26e3322b9ca # v1.7.2
|
||||||
SHA512 a1bda1b31d1bb3a4680fec91f180a988cf5ff486dcb8848fefd9245907f7986e4c4f10ce33133a3d796a7409ba38328bd156c47eba4f19368a2226a43b1ad298
|
SHA512 fc96f6aa6972c167a956d8f928d9becd546689356d86e800df0f54c9c46cedf74d686168f44566fb4d0aa9cddf7a9444327acd2180cc91386c53658c6a5018f1
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
PATCHES
|
||||||
fix-cmake.patch
|
fix-cmake.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
asm MI_SEE_ASM
|
FEATURES
|
||||||
secure MI_SECURE
|
asm MI_SEE_ASM
|
||||||
override MI_OVERRIDE
|
secure MI_SECURE
|
||||||
|
override MI_OVERRIDE
|
||||||
)
|
)
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MI_BUILD_STATIC)
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MI_BUILD_STATIC)
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MI_BUILD_SHARED)
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MI_BUILD_SHARED)
|
||||||
vcpkg_configure_cmake(
|
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
vcpkg_cmake_configure(
|
||||||
PREFER_NINJA
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
OPTIONS_DEBUG
|
OPTIONS_DEBUG
|
||||||
-DMI_CHECK_FULL=ON
|
-DMI_CHECK_FULL=ON
|
||||||
OPTIONS_RELEASE
|
OPTIONS_RELEASE
|
||||||
@ -31,41 +32,27 @@ vcpkg_configure_cmake(
|
|||||||
${FEATURE_OPTIONS}
|
${FEATURE_OPTIONS}
|
||||||
-DMI_BUILD_STATIC=${MI_BUILD_STATIC}
|
-DMI_BUILD_STATIC=${MI_BUILD_STATIC}
|
||||||
-DMI_BUILD_SHARED=${MI_BUILD_SHARED}
|
-DMI_BUILD_SHARED=${MI_BUILD_SHARED}
|
||||||
|
-DMI_INSTALL_TOPLEVEL=ON
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_cmake_install()
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
file(GLOB lib_directories RELATIVE ${CURRENT_PACKAGES_DIR}/lib "${CURRENT_PACKAGES_DIR}/lib/${PORT}-*")
|
|
||||||
list(GET lib_directories 0 lib_install_dir)
|
|
||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${lib_install_dir}/cmake)
|
|
||||||
|
|
||||||
vcpkg_replace_string(
|
|
||||||
${CURRENT_PACKAGES_DIR}/share/${PORT}/mimalloc.cmake
|
|
||||||
"lib/${lib_install_dir}/"
|
|
||||||
""
|
|
||||||
)
|
|
||||||
|
|
||||||
file(COPY
|
file(COPY
|
||||||
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
|
||||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||||
)
|
|
||||||
|
|
||||||
file(COPY ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/${lib_install_dir}
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/share
|
|
||||||
${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir}
|
|
||||||
)
|
)
|
||||||
|
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||||
vcpkg_replace_string(
|
vcpkg_replace_string(
|
||||||
${CURRENT_PACKAGES_DIR}/include/mimalloc.h
|
"${CURRENT_PACKAGES_DIR}/include/mimalloc.h"
|
||||||
"!defined(MI_SHARED_LIB)"
|
"!defined(MI_SHARED_LIB)"
|
||||||
"0 // !defined(MI_SHARED_LIB)"
|
"0 // !defined(MI_SHARED_LIB)"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
@ -1,10 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "mimalloc",
|
"name": "mimalloc",
|
||||||
"version-string": "1.6.4",
|
"version": "1.7.2",
|
||||||
"port-version": 1,
|
|
||||||
"description": "Compact general purpose allocator with excellent performance",
|
"description": "Compact general purpose allocator with excellent performance",
|
||||||
"homepage": "https://github.com/microsoft/mimalloc",
|
"homepage": "https://github.com/microsoft/mimalloc",
|
||||||
"supports": "!(arm | uwp)",
|
"supports": "!(arm | uwp)",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"features": {
|
"features": {
|
||||||
"asm": {
|
"asm": {
|
||||||
"description": "Generate assembly files"
|
"description": "Generate assembly files"
|
||||||
|
@ -4201,8 +4201,8 @@
|
|||||||
"port-version": 3
|
"port-version": 3
|
||||||
},
|
},
|
||||||
"mimalloc": {
|
"mimalloc": {
|
||||||
"baseline": "1.6.4",
|
"baseline": "1.7.2",
|
||||||
"port-version": 1
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"minc": {
|
"minc": {
|
||||||
"baseline": "2.4.03",
|
"baseline": "2.4.03",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "180bb46f618db60da2f6aa4accca24cdb90570e8",
|
||||||
|
"version": "1.7.2",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "5dfd6d52634b3dc1e63c380de459322b8c17f0a8",
|
"git-tree": "5dfd6d52634b3dc1e63c380de459322b8c17f0a8",
|
||||||
"version-string": "1.6.4",
|
"version-string": "1.6.4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user