Skip to content

Commit

Permalink
(#23709) mimalloc: add version 2.1.7, 1.8.7, remove older versions
Browse files Browse the repository at this point in the history
* mimalloc: add version 2.1.4, 1.8.4, remove older versions

* (trial) drop support 1.6.7

* make MI_WIN_REDIRECT off

* update 2.1.6

* update 2.1.7

* fix config.yml

* add build_requires
  • Loading branch information
toge authored Jun 7, 2024
1 parent a02324b commit a8ab0ec
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 268 deletions.
74 changes: 13 additions & 61 deletions recipes/mimalloc/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
sources:
"2.1.7":
url: "https://github.com/microsoft/mimalloc/archive/v2.1.7.tar.gz"
sha256: "0eed39319f139afde8515010ff59baf24de9e47ea316a315398e8027d198202d"
"2.1.2":
url: "https://github.com/microsoft/mimalloc/archive/v2.1.2.tar.gz"
sha256: "2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb"
"2.0.9":
url: "https://github.com/microsoft/mimalloc/archive/v2.0.9.tar.gz"
sha256: "4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850"
"2.0.7":
url: "https://github.com/microsoft/mimalloc/archive/v2.0.7.tar.gz"
sha256: "f23aac6c73594e417af50cb38f1efed88ef1dc14a490f0eff07c7f7b079810a4"
"2.0.6":
url: "https://github.com/microsoft/mimalloc/archive/v2.0.6.tar.gz"
sha256: "9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5"
"2.0.5":
url: "https://github.com/microsoft/mimalloc/archive/v2.0.5.tar.gz"
sha256: "fb000a017c289ddc0df749f16fef854e033e496276d8426bdd066b59c476f6cf"
"2.0.3":
url: "https://github.com/microsoft/mimalloc/archive/v2.0.3.tar.gz"
sha256: "5af497f360879bf9d07a5146961d275a25f4177fbe21ee6c437db604422acd60"
"2.0.2":
url: "https://github.com/microsoft/mimalloc/archive/v2.0.2.tar.gz"
sha256: "c81a5f443f72373e3105172d6a935e29b0dabd13ba387c080bc444586cbe3021"
"1.8.7":
url: "https://github.com/microsoft/mimalloc/archive/v1.8.7.tar.gz"
sha256: "347793a2c614e525edc4e286ab5cbc4c7a5efc12503e2dafca276d78394c4f07"
"1.8.2":
url: "https://github.com/microsoft/mimalloc/archive/v1.8.2.tar.gz"
sha256: "4058d53d6ceb75862f32c30a6ee686c3cbb5e965b2c324b828ca454f7fe064f9"
"1.7.9":
url: "https://github.com/microsoft/mimalloc/archive/v1.7.9.tar.gz"
sha256: "45e05be518363d32b2cdcce1a1fac3580895ea2e4524e1a3c7e71145cb58659f"
"1.7.7":
url: "https://github.com/microsoft/mimalloc/archive/v1.7.7.tar.gz"
sha256: "0f6663be1e1764851bf9563fcf7a6b3330e23b933eb4737dd07e3289b87895fe"
"1.7.6":
url: "https://github.com/microsoft/mimalloc/archive/v1.7.6.tar.gz"
sha256: "d74f86ada2329016068bc5a243268f1f555edd620b6a7d6ce89295e7d6cf18da"
"1.7.5":
url: "https://github.com/microsoft/mimalloc/archive/v1.7.5.tar.gz"
sha256: "4f9ed087fc1804a8a77c4225ffc3337468f18d6c4f060c4d44f3a3eff85bc5b6"
"1.6.7":
url: "https://github.com/microsoft/mimalloc/archive/v1.6.7.tar.gz"
sha256: "111b718b496f297f128d842880e72e90e33953cf00b45ba0ccd2167e7340ed17"
patches:
"2.1.7":
- patch_file: "patches/2.1.7-0002-support-older-compiler.patch"
patch_description: "fix compilation errors on older compilers"
patch_type: "portability"
"2.1.2":
- patch_file: "patches/2.1.2-0001-change-install-paths.patch"
patch_description: "fix install paths"
Expand All @@ -53,28 +39,9 @@ patches:
- patch_file: "patches/2.0.9-0002-support-older-compiler.patch"
patch_description: "fix compilation errors on older compilers"
patch_type: "portability"
"2.0.7":
- patch_file: "patches/2.0.7-0001-change-install-paths.patch"
patch_description: "fix install paths"
patch_type: "conan"
"2.0.6":
- patch_file: "patches/2.0.6-0001-change-install-paths.patch"
patch_description: "fix install paths"
patch_type: "conan"
"2.0.5":
- patch_file: "patches/2.0.6-0001-change-install-paths.patch"
patch_description: "fix install paths"
patch_type: "conan"
"2.0.3":
- patch_file: "patches/2.0.3-0001-change-install-paths-avoid-symlink.patch"
patch_description: "fix install paths, disable creating symlink"
patch_type: "conan"
"2.0.2":
- patch_file: "patches/2.0.2-0001-change-install-paths-avoid-symlink.patch"
patch_description: "fix install paths, disable creating symlink"
patch_type: "conan"
- patch_file: "patches/2.0.2-0002-include-cstddef-to-get-std-size-t.patch"
patch_description: "include stddef"
"1.8.7":
- patch_file: "patches/1.8.7-0002-support-older-compiler.patch"
patch_description: "fix compilation errors on older compilers"
patch_type: "portability"
"1.8.2":
- patch_file: "patches/1.8.2-0001-change-install-paths.patch"
Expand All @@ -90,22 +57,7 @@ patches:
- patch_file: "patches/1.7.9-0002-support-older-compiler.patch"
patch_description: "fix compilation errors on older compilers"
patch_type: "portability"
"1.7.7":
- patch_file: "patches/1.7.7-0001-change-install-paths.patch"
patch_description: "fix install paths"
patch_type: "conan"
"1.7.6":
- patch_file: "patches/1.7.5-0001-change-install-paths.patch"
patch_description: "fix install paths"
patch_type: "conan"
"1.7.5":
- patch_file: "patches/1.7.5-0001-change-install-paths.patch"
patch_description: "fix install paths"
patch_type: "conan"
"1.6.7":
- patch_file: "patches/1.6.7-0001-change-install-paths-avoid-symlink.patch"
patch_description: "fix install paths, disable creating symlink"
patch_type: "conan"
- patch_file: "patches/1.6.7-0002-include-cstddef-to-get-std-size-t.patch"
patch_description: "include stddef"
patch_type: "portability"
9 changes: 8 additions & 1 deletion recipes/mimalloc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file, save, collect_libs
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, VCVars
from conan.tools.scm import Version
from conan.tools.env import VirtualBuildEnv
import os
import shutil
import textwrap
Expand All @@ -13,10 +14,10 @@

class MimallocConan(ConanFile):
name = "mimalloc"
description = "mimalloc is a compact general purpose allocator with excellent performance."
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/microsoft/mimalloc"
description = "mimalloc is a compact general purpose allocator with excellent performance."
topics = ("mimalloc", "allocator", "performance", "microsoft")
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
Expand Down Expand Up @@ -94,6 +95,9 @@ def validate(self):
self.options.get_safe("inject"):
raise ConanInvalidConfiguration("Single object is incompatible with library injection")

def build_requirements(self):
self.tool_requires("cmake/[>=3.18 <4]")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

Expand All @@ -105,9 +109,12 @@ def generate(self):
tc.variables["MI_BUILD_OBJECT"] = self.options.get_safe("single_object", False)
tc.variables["MI_OVERRIDE"] = "ON" if self.options.override else "OFF"
tc.variables["MI_SECURE"] = "ON" if self.options.secure else "OFF"
tc.variables["MI_WIN_REDIRECT"] = "OFF"
if Version(self.version) >= "1.7.0":
tc.variables["MI_INSTALL_TOPLEVEL"] = "ON"
tc.generate()
venv = VirtualBuildEnv(self)
venv.generate(scope="build")

if is_msvc(self):
vcvars = VCVars(self)
Expand Down

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions recipes/mimalloc/all/patches/1.7.7-0001-change-install-paths.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/include/mimalloc.h b/include/mimalloc.h
index ae6f99b..773424e 100644
--- a/include/mimalloc.h
+++ b/include/mimalloc.h
@@ -511,7 +511,7 @@ template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : publi
#endif

void collect(bool force) { mi_heap_collect(this->heap.get(), force); }
- template<class U> bool is_equal(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) const { return (this->heap == x.heap); }
+ template<class U, bool b> bool is_equal(const _mi_heap_stl_allocator_common<U, b>& x) const { return (this->heap == x.heap); }

protected:
std::shared_ptr<mi_heap_t> heap;
@@ -522,7 +522,7 @@ protected:
this->heap.reset(hp, (_mi_destroy ? &heap_destroy : &heap_delete)); /* calls heap_delete/destroy when the refcount drops to zero */
}
_mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { }
- template<class U> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) mi_attr_noexcept : heap(x.heap) { }
+ template<class U, bool b> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, b>& x) mi_attr_noexcept : heap(x.heap) { }

private:
static void heap_delete(mi_heap_t* hp) { if (hp != NULL) { mi_heap_delete(hp); } }

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions recipes/mimalloc/all/patches/2.0.6-0001-change-install-paths.patch

This file was deleted.

22 changes: 0 additions & 22 deletions recipes/mimalloc/all/patches/2.0.7-0001-change-install-paths.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/include/mimalloc.h b/include/mimalloc.h
index c41bcc8..cc4929e 100644
--- a/include/mimalloc.h
+++ b/include/mimalloc.h
@@ -512,7 +512,7 @@ template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : publi
#endif

void collect(bool force) { mi_heap_collect(this->heap.get(), force); }
- template<class U> bool is_equal(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) const { return (this->heap == x.heap); }
+ template<class U, bool b> bool is_equal(const _mi_heap_stl_allocator_common<U, b>& x) const { return (this->heap == x.heap); }

protected:
std::shared_ptr<mi_heap_t> heap;
@@ -523,7 +523,7 @@ protected:
this->heap.reset(hp, (_mi_destroy ? &heap_destroy : &heap_delete)); /* calls heap_delete/destroy when the refcount drops to zero */
}
_mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { }
- template<class U> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) mi_attr_noexcept : heap(x.heap) { }
+ template<class U, bool b> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, b>& x) mi_attr_noexcept : heap(x.heap) { }

private:
static void heap_delete(mi_heap_t* hp) { if (hp != NULL) { mi_heap_delete(hp); } }
Loading

0 comments on commit a8ab0ec

Please sign in to comment.