From 7aeb3bd13938be6dd9ea7c2620e283abc693ac84 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 01:51:17 -0700 Subject: [PATCH 01/28] jemalloc: Make the recipe compatible with Conan 2.x. --- recipes/jemalloc/all/conanfile.py | 338 +++++++++++------- .../jemalloc/all/test_package/CMakeLists.txt | 9 +- .../jemalloc/all/test_package/conanfile.py | 21 +- .../all/test_v1_package/CMakeLists.txt | 8 + .../jemalloc/all/test_v1_package/conanfile.py | 17 + 5 files changed, 254 insertions(+), 139 deletions(-) create mode 100644 recipes/jemalloc/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/jemalloc/all/test_v1_package/conanfile.py diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 03cf37de219b0..cb10ccda30d38 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -1,10 +1,16 @@ from conan import ConanFile -from conans import AutoToolsBuildEnvironment, MSBuild from conan.errors import ConanInvalidConfiguration -from conan.tools.scm import Version -from conans import tools as tools_legacy -from conan.tools.files import apply_conandata_patches, get, rename, replace_in_file +from conan.tools.env import VirtualBuildEnv +from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout +from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename, replace_in_file +from conan.tools.scm import Version + + +# from conans import AutoToolsBuildEnvironment, MSBuild + +# from conans import tools as tools_legacy + import os import shutil import string @@ -22,7 +28,7 @@ class JemallocConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "prefix": "ANY", + "prefix": ["ANY"], "enable_cxx": [True, False], "enable_fill": [True, False], "enable_xmalloc": [True, False], @@ -49,9 +55,13 @@ class JemallocConan(ConanFile): "enable_libdl": True, "enable_prof": False, } - exports_sources = ["patches/**"] - _autotools = None + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -59,10 +69,19 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self.options.enable_cxx: - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") def validate(self): if self.options.enable_cxx and \ @@ -70,40 +89,32 @@ def validate(self): self.settings.compiler == "clang" and \ Version(self.settings.compiler.version) < "10": raise ConanInvalidConfiguration("clang and libc++ version {} (< 10) is missing a mutex implementation".format(self.settings.compiler.version)) - if self.settings.compiler == "Visual Studio" and \ - self.options.shared and \ - "MT" in self.settings.compiler.runtime: - raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") - if self.settings.compiler == "Visual Studio" and self.settings.compiler.version != "15": - # https://github.com/jemalloc/jemalloc/issues/1703 - raise ConanInvalidConfiguration("Only Visual Studio 15 2017 is supported. Please fix this if other versions are supported") + # TODO: REVISE THIS + # if self.settings.compiler == "Visual Studio" and \ + # self.options.shared and \ + # "MT" in self.settings.compiler.runtime: + # raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") + # if self.settings.compiler == "Visual Studio" and self.settings.compiler.version != "15": + # # https://github.com/jemalloc/jemalloc/issues/1703 + # raise ConanInvalidConfiguration("Only Visual Studio 15 2017 is supported. Please fix this if other versions are supported") if self.settings.build_type not in ("Release", "Debug", None): raise ConanInvalidConfiguration("Only Release and Debug build_types are supported") - if self.settings.compiler == "Visual Studio" and self.settings.arch not in ("x86_64", "x86"): - raise ConanInvalidConfiguration("Unsupported arch") + # if self.settings.compiler == "Visual Studio" and self.settings.arch not in ("x86_64", "x86"): + # raise ConanInvalidConfiguration("Unsupported arch") if self.settings.compiler == "clang" and Version(self.settings.compiler.version) <= "3.9": raise ConanInvalidConfiguration("Unsupported compiler version") if self.settings.os == "Macos" and self.settings.arch not in ("x86_64", "x86"): raise ConanInvalidConfiguration("Unsupported arch") - def layout(self): - basic_layout(self, src_folder="src") - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - - def build_requirements(self): - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool): - self.build_requires("msys2/cci.latest") - def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @property - def _autotools_args(self): - conf_args = [ - "--with-jemalloc-prefix={}".format(self.options.prefix), + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + tc.configure_args.extend([ + f"--with-jemalloc-prefix={self.options.prefix}", "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", "--enable-cxx" if self.options.enable_cxx else "--disable-cxx", "--enable-fill" if self.options.enable_fill else "--disable-fill", @@ -114,113 +125,184 @@ def _autotools_args(self): "--enable-log" if self.options.enable_debug_logging else "--disable-log", "--enable-initial-exec-tls" if self.options.enable_initial_exec_tls else "--disable-initial-exec-tls", "--enable-libdl" if self.options.enable_libdl else "--disable-libdl", - ] + ]) if self.options.enable_prof: - conf_args.append("--enable-prof") + tc.configure_args.append("--enable-prof") if self.options.shared: - conf_args.extend(["--enable-shared", "--disable-static"]) + tc.configure_args.append("--enable-shared") + tc.configure_args.append("--disable-static") else: - conf_args.extend(["--disable-shared", "--enable-static"]) - return conf_args - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools_legacy.os_info.is_windows) - self._autotools.configure(args=self._autotools_args, configure_dir=self.source_folder) - return self._autotools - - @property - def _msvc_build_type(self): - build_type = str(self.settings.build_type) or "Release" - if not self.options.shared: - build_type += "-static" - return build_type - - def _patch_sources(self): - if self.settings.os == "Windows": - makefile_in = os.path.join(self.source_folder, "Makefile.in") - replace_in_file(self, makefile_in, - "DSO_LDFLAGS = @DSO_LDFLAGS@", - "DSO_LDFLAGS = @DSO_LDFLAGS@ -Wl,--out-implib,lib/libjemalloc.a", strict=False) - replace_in_file(self, makefile_in, - "\t$(INSTALL) -d $(LIBDIR)\n" - "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)", - "\t$(INSTALL) -d $(BINDIR)\n" - "\t$(INSTALL) -d $(LIBDIR)\n" - "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(BINDIR)\n" - "\t$(INSTALL) -m 644 $(objroot)lib/libjemalloc.a $(LIBDIR)", strict=False) + tc.configure_args.append("--disable-shared") + tc.configure_args.append("--enable-static") + tc.generate() + def build(self): apply_conandata_patches(self) + autotools = Autotools(self) + autotools.configure() + autotools.make() + def package(self): + copy(self, pattern="COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install(target="install_lib_shared" if self.options.shared else "install_lib_static") + autotools.install(target="install_include") - def build(self): - self._patch_sources() - if self.settings.compiler == "Visual Studio": - with tools_legacy.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): - with tools_legacy.environment_append({"CC": "cl", "CXX": "cl"}) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): - with tools_legacy.chdir(self.source_folder): - # Do not use AutoToolsBuildEnvironment because we want to run configure as ./configure - self.run("./configure {}".format(" ".join(self._autotools_args)), win_bash=tools_legacy.os_info.is_windows) - msbuild = MSBuild(self) - # Do not use the 2015 solution: unresolved external symbols: test_hooks_libc_hook and test_hooks_arena_new_hook - sln_file = os.path.join(self.source_folder, "msvc", "jemalloc_vc2017.sln") - msbuild.build(sln_file, targets=["jemalloc"], build_type=self._msvc_build_type) - else: - autotools = self._configure_autotools() - autotools.make() - @property - def _library_name(self): - libname = "jemalloc" - if self.settings.compiler == "Visual Studio": - if self.options.shared: - if self.settings.build_type == "Debug": - libname += "d" - else: - toolset = tools_legacy.msvs_toolset(self.settings) - toolset_number = "".join(c for c in toolset if c in string.digits) - libname += "-vc{}-{}".format(toolset_number, self._msvc_build_type) - else: - if self.settings.os == "Windows": - if not self.options.shared: - libname += "_s" - else: - if not self.options.shared and self.options.fPIC: - libname += "_pic" - return libname - - def package(self): - self.copy(pattern="COPYING", src=self.source_folder, dst="licenses") - if self.settings.compiler == "Visual Studio": - arch_subdir = { - "x86_64": "x64", - "x86": "x86", - }[str(self.settings.arch)] - self.copy("*.lib", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "lib")) - self.copy("*.dll", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "bin")) - self.copy("jemalloc.h", src=os.path.join(self.source_folder, "include", "jemalloc"), dst=os.path.join(self.package_folder, "include", "jemalloc"), keep_path=True) - shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), - os.path.join(self.package_folder, "include", "msvc_compat")) - else: - autotools = self._configure_autotools() - # Use install_lib_XXX and install_include to avoid mixing binaries and dll's - autotools.make(target="install_lib_shared" if self.options.shared else "install_lib_static") - autotools.make(target="install_include") - if self.settings.os == "Windows" and self.settings.compiler == "gcc": - rename(self, os.path.join(self.package_folder, "lib", "{}.lib".format(self._library_name)), - os.path.join(self.package_folder, "lib", "lib{}.a".format(self._library_name))) - if not self.options.shared: - os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) + # if self.settings.compiler == "Visual Studio": + # arch_subdir = { + # "x86_64": "x64", + # "x86": "x86", + # }[str(self.settings.arch)] + # self.copy("*.lib", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "lib")) + # self.copy("*.dll", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "bin")) + # self.copy("jemalloc.h", src=os.path.join(self.source_folder, "include", "jemalloc"), dst=os.path.join(self.package_folder, "include", "jemalloc"), keep_path=True) + # shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), + # os.path.join(self.package_folder, "include", "msvc_compat")) + # else: + # autotools = self._configure_autotools() + # # Use install_lib_XXX and install_include to avoid mixing binaries and dll's + # autotools.make(target="install_lib_shared" if self.options.shared else "install_lib_static") + # autotools.make(target="install_include") + # if self.settings.os == "Windows" and self.settings.compiler == "gcc": + # rename(self, os.path.join(self.package_folder, "lib", "{}.lib".format(self._library_name)), + # os.path.join(self.package_folder, "lib", "lib{}.a".format(self._library_name))) + # if not self.options.shared: + # os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) def package_info(self): - self.cpp_info.names["pkg_config"] = "jemalloc" - self.cpp_info.libs = [self._library_name] + self.cpp_info.set_property("pkg_config_name", "jemalloc") + self.cpp_info.libs = ["jemalloc"] # TODO: Previously self._library_name self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), os.path.join(self.package_folder, "include", "jemalloc")] - if self.settings.compiler == "Visual Studio": + if self.settings.compiler == "msvc": self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "msvc_compat")) if not self.options.shared: self.cpp_info.defines = ["JEMALLOC_EXPORT="] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) + + # @property + # def _autotools_args(self): + # conf_args = [ + # "--with-jemalloc-prefix={}".format(self.options.prefix), + # "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", + # "--enable-cxx" if self.options.enable_cxx else "--disable-cxx", + # "--enable-fill" if self.options.enable_fill else "--disable-fill", + # "--enable-xmalloc" if self.options.enable_cxx else "--disable-xmalloc", + # "--enable-readlinkat" if self.options.enable_readlinkat else "--disable-readlinkat", + # "--enable-syscall" if self.options.enable_syscall else "--disable-syscall", + # "--enable-lazy-lock" if self.options.enable_lazy_lock else "--disable-lazy-lock", + # "--enable-log" if self.options.enable_debug_logging else "--disable-log", + # "--enable-initial-exec-tls" if self.options.enable_initial_exec_tls else "--disable-initial-exec-tls", + # "--enable-libdl" if self.options.enable_libdl else "--disable-libdl", + # ] + # if self.options.enable_prof: + # conf_args.append("--enable-prof") + # if self.options.shared: + # conf_args.extend(["--enable-shared", "--disable-static"]) + # else: + # conf_args.extend(["--disable-shared", "--enable-static"]) + # return conf_args + + # def _configure_autotools(self): + # if self._autotools: + # return self._autotools + # self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools_legacy.os_info.is_windows) + # self._autotools.configure(args=self._autotools_args, configure_dir=self.source_folder) + # return self._autotools + + # @property + # def _msvc_build_type(self): + # build_type = str(self.settings.build_type) or "Release" + # if not self.options.shared: + # build_type += "-static" + # return build_type + + # def _patch_sources(self): # TODO: Is this necessary??? + # if self.settings.os == "Windows": + # makefile_in = os.path.join(self.source_folder, "Makefile.in") + # replace_in_file(self, makefile_in, + # "DSO_LDFLAGS = @DSO_LDFLAGS@", + # "DSO_LDFLAGS = @DSO_LDFLAGS@ -Wl,--out-implib,lib/libjemalloc.a", strict=False) + # replace_in_file(self, makefile_in, + # "\t$(INSTALL) -d $(LIBDIR)\n" + # "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)", + # "\t$(INSTALL) -d $(BINDIR)\n" + # "\t$(INSTALL) -d $(LIBDIR)\n" + # "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(BINDIR)\n" + # "\t$(INSTALL) -m 644 $(objroot)lib/libjemalloc.a $(LIBDIR)", strict=False) + # + # apply_conandata_patches(self) + + + # def build(self): + # self._patch_sources() + # if self.settings.compiler == "Visual Studio": + # with tools_legacy.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): + # with tools_legacy.environment_append({"CC": "cl", "CXX": "cl"}) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): + # with tools_legacy.chdir(self.source_folder): + # # Do not use AutoToolsBuildEnvironment because we want to run configure as ./configure + # self.run("./configure {}".format(" ".join(self._autotools_args)), win_bash=tools_legacy.os_info.is_windows) + # msbuild = MSBuild(self) + # # Do not use the 2015 solution: unresolved external symbols: test_hooks_libc_hook and test_hooks_arena_new_hook + # sln_file = os.path.join(self.source_folder, "msvc", "jemalloc_vc2017.sln") + # msbuild.build(sln_file, targets=["jemalloc"], build_type=self._msvc_build_type) + # else: + # autotools = self._configure_autotools() + # autotools.make() + + # @property + # def _library_name(self): + # libname = "jemalloc" + # if self.settings.compiler == "Visual Studio": + # if self.options.shared: + # if self.settings.build_type == "Debug": + # libname += "d" + # else: + # toolset = tools_legacy.msvs_toolset(self.settings) + # toolset_number = "".join(c for c in toolset if c in string.digits) + # libname += "-vc{}-{}".format(toolset_number, self._msvc_build_type) + # else: + # if self.settings.os == "Windows": + # if not self.options.shared: + # libname += "_s" + # else: + # if not self.options.shared and self.options.fPIC: + # libname += "_pic" + # return libname + + # def package(self): + # self.copy(pattern="COPYING", src=self.source_folder, dst="licenses") + # if self.settings.compiler == "Visual Studio": + # arch_subdir = { + # "x86_64": "x64", + # "x86": "x86", + # }[str(self.settings.arch)] + # self.copy("*.lib", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "lib")) + # self.copy("*.dll", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "bin")) + # self.copy("jemalloc.h", src=os.path.join(self.source_folder, "include", "jemalloc"), dst=os.path.join(self.package_folder, "include", "jemalloc"), keep_path=True) + # shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), + # os.path.join(self.package_folder, "include", "msvc_compat")) + # else: + # autotools = self._configure_autotools() + # # Use install_lib_XXX and install_include to avoid mixing binaries and dll's + # autotools.make(target="install_lib_shared" if self.options.shared else "install_lib_static") + # autotools.make(target="install_include") + # if self.settings.os == "Windows" and self.settings.compiler == "gcc": + # rename(self, os.path.join(self.package_folder, "lib", "{}.lib".format(self._library_name)), + # os.path.join(self.package_folder, "lib", "lib{}.a".format(self._library_name))) + # if not self.options.shared: + # os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) + # + # def package_info(self): + # self.cpp_info.names["pkg_config"] = "jemalloc" + # self.cpp_info.libs = [self._library_name] + # self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), + # os.path.join(self.package_folder, "include", "jemalloc")] + # if self.settings.compiler == "Visual Studio": + # self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "msvc_compat")) + # if not self.options.shared: + # self.cpp_info.defines = ["JEMALLOC_EXPORT="] + # if self.settings.os in ["Linux", "FreeBSD"]: + # self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) diff --git a/recipes/jemalloc/all/test_package/CMakeLists.txt b/recipes/jemalloc/all/test_package/CMakeLists.txt index 0cc486467b601..cc7017681c623 100644 --- a/recipes/jemalloc/all/test_package/CMakeLists.txt +++ b/recipes/jemalloc/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) +project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(jemalloc REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PRIVATE jemalloc::jemalloc) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/jemalloc/all/test_package/conanfile.py b/recipes/jemalloc/all/test_package/conanfile.py index d4128b0450777..d60b533632ddd 100644 --- a/recipes/jemalloc/all/test_package/conanfile.py +++ b/recipes/jemalloc/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/jemalloc/all/test_v1_package/CMakeLists.txt b/recipes/jemalloc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..0d20897301b68 --- /dev/null +++ b/recipes/jemalloc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/jemalloc/all/test_v1_package/conanfile.py b/recipes/jemalloc/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/jemalloc/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 1400c60f92889af10bed30fba1fde51401a46b09 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 02:24:41 -0700 Subject: [PATCH 02/28] jemalloc: Add the patch that adds support for Visual Studio 2019 and 2022. --- recipes/jemalloc/all/conandata.yml | 7 + recipes/jemalloc/all/conanfile.py | 13 +- ...port-for-Visual-Studio-2019-and-2022.patch | 2081 +++++++++++++++++ 3 files changed, 2091 insertions(+), 10 deletions(-) create mode 100644 recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch diff --git a/recipes/jemalloc/all/conandata.yml b/recipes/jemalloc/all/conandata.yml index 01ec764057557..1030395497e97 100644 --- a/recipes/jemalloc/all/conandata.yml +++ b/recipes/jemalloc/all/conandata.yml @@ -9,3 +9,10 @@ sources: patches: "5.2.1": - patch_file: "patches/0001-clang12-dont-declare-system-functions-as-nothrow.patch" + - patch_file: "patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch" + patch_type: "backport" + patch_source: "https://github.com/jemalloc/jemalloc/pull/2335" + "5.3.0": + - patch_file: "patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch" + patch_type: "backport" + patch_source: "https://github.com/jemalloc/jemalloc/pull/2335" diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index cb10ccda30d38..a03b6f5b9b8ca 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -5,24 +5,17 @@ from conan.tools.layout import basic_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename, replace_in_file from conan.tools.scm import Version - - -# from conans import AutoToolsBuildEnvironment, MSBuild - -# from conans import tools as tools_legacy - import os -import shutil -import string -required_conan_version = ">=1.51.3" +required_conan_version = ">=1.54.0" + class JemallocConan(ConanFile): name = "jemalloc" description = "jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support." url = "https://github.com/conan-io/conan-center-index" license = "BSD-2-Clause" - homepage = "http://jemalloc.net/" + homepage = "https://jemalloc.net/" topics = ("conan", "jemalloc", "malloc", "free") settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch b/recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch new file mode 100644 index 0000000000000..c032bb7ccb299 --- /dev/null +++ b/recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch @@ -0,0 +1,2081 @@ +From e8b28908dede2a27530dbaa255af6cbcf579fc31 Mon Sep 17 00:00:00 2001 +From: Fernando Pelliccioni +Date: Fri, 23 Sep 2022 11:34:05 -0300 +Subject: [PATCH] [MSVC] support for Visual Studio 2019 and 2022 + +--- + msvc/jemalloc_vc2019.sln | 63 +++ + msvc/jemalloc_vc2022.sln | 63 +++ + .../projects/vc2019/jemalloc/jemalloc.vcxproj | 379 ++++++++++++++++++ + .../vc2019/jemalloc/jemalloc.vcxproj.filters | 197 +++++++++ + .../vc2019/test_threads/test_threads.vcxproj | 326 +++++++++++++++ + .../test_threads/test_threads.vcxproj.filters | 26 ++ + .../projects/vc2022/jemalloc/jemalloc.vcxproj | 379 ++++++++++++++++++ + .../vc2022/jemalloc/jemalloc.vcxproj.filters | 197 +++++++++ + .../vc2022/test_threads/test_threads.vcxproj | 326 +++++++++++++++ + .../test_threads/test_threads.vcxproj.filters | 26 ++ + 10 files changed, 1982 insertions(+) + create mode 100644 msvc/jemalloc_vc2019.sln + create mode 100644 msvc/jemalloc_vc2022.sln + create mode 100644 msvc/projects/vc2019/jemalloc/jemalloc.vcxproj + create mode 100644 msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters + create mode 100644 msvc/projects/vc2019/test_threads/test_threads.vcxproj + create mode 100644 msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters + create mode 100644 msvc/projects/vc2022/jemalloc/jemalloc.vcxproj + create mode 100644 msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters + create mode 100644 msvc/projects/vc2022/test_threads/test_threads.vcxproj + create mode 100644 msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters + +diff --git a/msvc/jemalloc_vc2019.sln b/msvc/jemalloc_vc2019.sln +new file mode 100644 +index 00000000..871ea9d4 +--- /dev/null ++++ b/msvc/jemalloc_vc2019.sln +@@ -0,0 +1,63 @@ ++ ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 14 ++VisualStudioVersion = 14.0.24720.0 ++MinimumVisualStudioVersion = 10.0.40219.1 ++Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70A99006-6DE9-472B-8F83-4CEE6C616DF3}" ++ ProjectSection(SolutionItems) = preProject ++ ReadMe.txt = ReadMe.txt ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jemalloc", "projects\vc2019\jemalloc\jemalloc.vcxproj", "{8D6BB292-9E1C-413D-9F98-4864BDC1514A}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_threads", "projects\vc2019\test_threads\test_threads.vcxproj", "{09028CFD-4EB7-491D-869C-0708DB97ED44}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|x64 = Debug|x64 ++ Debug|x86 = Debug|x86 ++ Debug-static|x64 = Debug-static|x64 ++ Debug-static|x86 = Debug-static|x86 ++ Release|x64 = Release|x64 ++ Release|x86 = Release|x86 ++ Release-static|x64 = Release-static|x64 ++ Release-static|x86 = Release-static|x86 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.ActiveCfg = Debug|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.Build.0 = Debug|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.ActiveCfg = Debug|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.Build.0 = Debug|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.ActiveCfg = Debug-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.Build.0 = Debug-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.ActiveCfg = Debug-static|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.Build.0 = Debug-static|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.ActiveCfg = Release|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.Build.0 = Release|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.ActiveCfg = Release|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.Build.0 = Release|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.ActiveCfg = Release-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.Build.0 = Release-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.ActiveCfg = Release-static|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.Build.0 = Release-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.ActiveCfg = Debug|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.Build.0 = Debug|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.ActiveCfg = Debug|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.Build.0 = Debug|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.ActiveCfg = Debug-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.Build.0 = Debug-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.ActiveCfg = Debug-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.Build.0 = Debug-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.ActiveCfg = Release|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.Build.0 = Release|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.ActiveCfg = Release|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.Build.0 = Release|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.ActiveCfg = Release-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.Build.0 = Release-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.ActiveCfg = Release-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.Build.0 = Release-static|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/msvc/jemalloc_vc2022.sln b/msvc/jemalloc_vc2022.sln +new file mode 100644 +index 00000000..898574f1 +--- /dev/null ++++ b/msvc/jemalloc_vc2022.sln +@@ -0,0 +1,63 @@ ++ ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 14 ++VisualStudioVersion = 14.0.24720.0 ++MinimumVisualStudioVersion = 10.0.40219.1 ++Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70A99006-6DE9-472B-8F83-4CEE6C616DF3}" ++ ProjectSection(SolutionItems) = preProject ++ ReadMe.txt = ReadMe.txt ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jemalloc", "projects\vc2022\jemalloc\jemalloc.vcxproj", "{8D6BB292-9E1C-413D-9F98-4864BDC1514A}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_threads", "projects\vc2022\test_threads\test_threads.vcxproj", "{09028CFD-4EB7-491D-869C-0708DB97ED44}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|x64 = Debug|x64 ++ Debug|x86 = Debug|x86 ++ Debug-static|x64 = Debug-static|x64 ++ Debug-static|x86 = Debug-static|x86 ++ Release|x64 = Release|x64 ++ Release|x86 = Release|x86 ++ Release-static|x64 = Release-static|x64 ++ Release-static|x86 = Release-static|x86 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.ActiveCfg = Debug|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.Build.0 = Debug|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.ActiveCfg = Debug|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.Build.0 = Debug|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.ActiveCfg = Debug-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.Build.0 = Debug-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.ActiveCfg = Debug-static|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.Build.0 = Debug-static|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.ActiveCfg = Release|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.Build.0 = Release|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.ActiveCfg = Release|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.Build.0 = Release|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.ActiveCfg = Release-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.Build.0 = Release-static|x64 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.ActiveCfg = Release-static|Win32 ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.Build.0 = Release-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.ActiveCfg = Debug|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.Build.0 = Debug|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.ActiveCfg = Debug|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.Build.0 = Debug|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.ActiveCfg = Debug-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.Build.0 = Debug-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.ActiveCfg = Debug-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.Build.0 = Debug-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.ActiveCfg = Release|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.Build.0 = Release|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.ActiveCfg = Release|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.Build.0 = Release|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.ActiveCfg = Release-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.Build.0 = Release-static|x64 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.ActiveCfg = Release-static|Win32 ++ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.Build.0 = Release-static|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj +new file mode 100644 +index 00000000..66ba849d +--- /dev/null ++++ b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj +@@ -0,0 +1,379 @@ ++ ++ ++ ++ ++ Debug-static ++ Win32 ++ ++ ++ Debug-static ++ x64 ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release-static ++ Win32 ++ ++ ++ Release-static ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A} ++ Win32Proj ++ jemalloc ++ ++ ++ ++ DynamicLibrary ++ true ++ v142 ++ MultiByte ++ ++ ++ StaticLibrary ++ true ++ v142 ++ MultiByte ++ ++ ++ DynamicLibrary ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ StaticLibrary ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ DynamicLibrary ++ true ++ v142 ++ MultiByte ++ ++ ++ StaticLibrary ++ true ++ v142 ++ MultiByte ++ ++ ++ DynamicLibrary ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ StaticLibrary ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)d ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-$(PlatformToolset)-$(Configuration) ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-$(PlatformToolset)-$(Configuration) ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)d ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ _REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_NO_PRIVATE_NAMESPACE;JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ 4090;4146;4267;4334 ++ OldStyle ++ false ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ _REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ _REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ 4090;4146;4267;4334 ++ OldStyle ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters +new file mode 100644 +index 00000000..1b43e9f2 +--- /dev/null ++++ b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters +@@ -0,0 +1,197 @@ ++ ++ ++ ++ ++ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} ++ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx ++ ++ ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2019/test_threads/test_threads.vcxproj b/msvc/projects/vc2019/test_threads/test_threads.vcxproj +new file mode 100644 +index 00000000..8471a41e +--- /dev/null ++++ b/msvc/projects/vc2019/test_threads/test_threads.vcxproj +@@ -0,0 +1,326 @@ ++ ++ ++ ++ ++ Debug-static ++ Win32 ++ ++ ++ Debug-static ++ x64 ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release-static ++ Win32 ++ ++ ++ Release-static ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ {09028CFD-4EB7-491D-869C-0708DB97ED44} ++ Win32Proj ++ test_threads ++ ++ ++ ++ Application ++ true ++ v142 ++ MultiByte ++ ++ ++ Application ++ true ++ v142 ++ MultiByte ++ ++ ++ Application ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ Application ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ Application ++ true ++ v142 ++ MultiByte ++ ++ ++ Application ++ true ++ v142 ++ MultiByte ++ ++ ++ Application ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ Application ++ false ++ v142 ++ true ++ MultiByte ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ true ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ true ++ ++ ++ true ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ ++ ++ true ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ ++ ++ Console ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ _DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ $(SolutionDir)$(Platform)\$(Configuration) ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ ++ ++ Console ++ true ++ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ $(SolutionDir)$(Platform)\$(Configuration) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ ++ ++ {8d6bb292-9e1c-413d-9f98-4864bdc1514a} ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters b/msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters +new file mode 100644 +index 00000000..fa4588fd +--- /dev/null ++++ b/msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} ++ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx ++ ++ ++ {93995380-89BD-4b04-88EB-625FBE52EBFB} ++ h;hh;hpp;hxx;hm;inl;inc;xsd ++ ++ ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ ++ ++ Header Files ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj +new file mode 100644 +index 00000000..7d9a1aa0 +--- /dev/null ++++ b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj +@@ -0,0 +1,379 @@ ++ ++ ++ ++ ++ Debug-static ++ Win32 ++ ++ ++ Debug-static ++ x64 ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release-static ++ Win32 ++ ++ ++ Release-static ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {8D6BB292-9E1C-413D-9F98-4864BDC1514A} ++ Win32Proj ++ jemalloc ++ ++ ++ ++ DynamicLibrary ++ true ++ v143 ++ MultiByte ++ ++ ++ StaticLibrary ++ true ++ v143 ++ MultiByte ++ ++ ++ DynamicLibrary ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ StaticLibrary ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ DynamicLibrary ++ true ++ v143 ++ MultiByte ++ ++ ++ StaticLibrary ++ true ++ v143 ++ MultiByte ++ ++ ++ DynamicLibrary ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ StaticLibrary ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)d ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-$(PlatformToolset)-$(Configuration) ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-$(PlatformToolset)-$(Configuration) ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)d ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ _REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_NO_PRIVATE_NAMESPACE;JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ 4090;4146;4267;4334 ++ OldStyle ++ false ++ ++ ++ Windows ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ _REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ _REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) ++ 4090;4146;4267;4334 ++ $(OutputPath)$(TargetName).pdb ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ 4090;4146;4267;4334 ++ OldStyle ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters +new file mode 100644 +index 00000000..1b43e9f2 +--- /dev/null ++++ b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters +@@ -0,0 +1,197 @@ ++ ++ ++ ++ ++ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} ++ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx ++ ++ ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2022/test_threads/test_threads.vcxproj b/msvc/projects/vc2022/test_threads/test_threads.vcxproj +new file mode 100644 +index 00000000..471f693b +--- /dev/null ++++ b/msvc/projects/vc2022/test_threads/test_threads.vcxproj +@@ -0,0 +1,326 @@ ++ ++ ++ ++ ++ Debug-static ++ Win32 ++ ++ ++ Debug-static ++ x64 ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release-static ++ Win32 ++ ++ ++ Release-static ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ {09028CFD-4EB7-491D-869C-0708DB97ED44} ++ Win32Proj ++ test_threads ++ ++ ++ ++ Application ++ true ++ v143 ++ MultiByte ++ ++ ++ Application ++ true ++ v143 ++ MultiByte ++ ++ ++ Application ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ Application ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ Application ++ true ++ v143 ++ MultiByte ++ ++ ++ Application ++ true ++ v143 ++ MultiByte ++ ++ ++ Application ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ Application ++ false ++ v143 ++ true ++ MultiByte ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ true ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ true ++ ++ ++ true ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ ++ ++ true ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ $(SolutionDir)$(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ ++ false ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ ++ ++ Console ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ _DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ $(SolutionDir)$(Platform)\$(Configuration) ++ ++ ++ ++ ++ ++ ++ Level3 ++ Disabled ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug ++ ++ ++ Console ++ true ++ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ $(SolutionDir)$(Platform)\$(Configuration) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) ++ MultiThreaded ++ ++ ++ Console ++ true ++ true ++ true ++ $(SolutionDir)$(Platform)\$(Configuration) ++ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ ++ ++ {8d6bb292-9e1c-413d-9f98-4864bdc1514a} ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters b/msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters +new file mode 100644 +index 00000000..fa4588fd +--- /dev/null ++++ b/msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} ++ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx ++ ++ ++ {93995380-89BD-4b04-88EB-625FBE52EBFB} ++ h;hh;hpp;hxx;hm;inl;inc;xsd ++ ++ ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ ++ ++ Header Files ++ ++ ++ +\ No newline at end of file +-- +2.39.2 (Apple Git-143) + From aef9753e2f2f40202ac6a89dd9ed4a470ab8a321 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 02:55:33 -0700 Subject: [PATCH 03/28] jemalloc: Revise the implementation of `validate()`. --- recipes/jemalloc/all/conanfile.py | 44 ++++++++++++++++++------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index a03b6f5b9b8ca..0e8fea816e24e 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename, replace_in_file +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -77,27 +78,32 @@ def build_requirements(self): self.tool_requires("msys2/cci.latest") def validate(self): - if self.options.enable_cxx and \ - self.settings.compiler.get_safe("libcxx") == "libc++" and \ - self.settings.compiler == "clang" and \ - Version(self.settings.compiler.version) < "10": - raise ConanInvalidConfiguration("clang and libc++ version {} (< 10) is missing a mutex implementation".format(self.settings.compiler.version)) - # TODO: REVISE THIS - # if self.settings.compiler == "Visual Studio" and \ - # self.options.shared and \ - # "MT" in self.settings.compiler.runtime: - # raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") - # if self.settings.compiler == "Visual Studio" and self.settings.compiler.version != "15": - # # https://github.com/jemalloc/jemalloc/issues/1703 - # raise ConanInvalidConfiguration("Only Visual Studio 15 2017 is supported. Please fix this if other versions are supported") + # 1. MSVC specific checks + if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + # The upstream repository provides solution files for Visual Studio 2015, 2017, 2019 and 2022, + # but the 2015 solution does not work properly due to unresolved external symbols: + # `test_hooks_libc_hook` and `test_hooks_arena_new_hook` + check_min_vs(self, "191") + # Building the shared library with a static MSVC runtime is not supported + if self.options.shared and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("Building the shared library with MT runtime is not supported.") + # Only x86-64 and x86 are supported + if self.settings.arch not in ["x86_64", "x86"]: + raise ConanInvalidConfiguration(f"{self.settings.arch} is not supported.") + # 2. Clang specific checks + if self.settings.compiler == "clang": + if Version(self.settings.compiler.version) <= "3.9": + raise ConanInvalidConfiguration("Clang 3.9 or earlier is not supported.") + if self.options.enable_cxx and self.settings.compiler.get_safe("libcxx") == "libc++" and \ + Version(self.settings.compiler.version) < "10": + raise ConanInvalidConfiguration(f"Clang 9 or earlier with libc++ is not supported due to the missing mutex implementation.") + # 3. Verify the build type if self.settings.build_type not in ("Release", "Debug", None): - raise ConanInvalidConfiguration("Only Release and Debug build_types are supported") - # if self.settings.compiler == "Visual Studio" and self.settings.arch not in ("x86_64", "x86"): + raise ConanInvalidConfiguration("Only Release and Debug builds are supported.") + + # jemalloc seems to support Apple Silicon Macs (Reference: Homebrew) + # if self.settings.os == "Macos" and self.settings.arch not in ("x86_64", "x86"): # raise ConanInvalidConfiguration("Unsupported arch") - if self.settings.compiler == "clang" and Version(self.settings.compiler.version) <= "3.9": - raise ConanInvalidConfiguration("Unsupported compiler version") - if self.settings.os == "Macos" and self.settings.arch not in ("x86_64", "x86"): - raise ConanInvalidConfiguration("Unsupported arch") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 7d5beaf90585fea93df1b77599c9473179880dd9 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 03:26:53 -0700 Subject: [PATCH 04/28] jemalloc: Define the env variable `CC` if jemalloc is compiled by MSVC. --- recipes/jemalloc/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 0e8fea816e24e..2ebe91afdd442 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -133,7 +133,9 @@ def generate(self): else: tc.configure_args.append("--disable-shared") tc.configure_args.append("--enable-static") - tc.generate() + if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + env.define("CC", "cl.exe") + tc.generate(env) def build(self): apply_conandata_patches(self) From 41d0cc4506dbf8c5f3a68249f6d244ddd661a961 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 03:28:43 -0700 Subject: [PATCH 05/28] jemalloc: Fix the typo. --- recipes/jemalloc/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 2ebe91afdd442..783d44d56511b 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -133,6 +133,7 @@ def generate(self): else: tc.configure_args.append("--disable-shared") tc.configure_args.append("--enable-static") + env = tc.environment() if str(self.settings.compiler) in ["Visual Studio", "msvc"]: env.define("CC", "cl.exe") tc.generate(env) From db28d857353da984d71d7797099fd4042417db7d Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 03:51:57 -0700 Subject: [PATCH 06/28] jemalloc: Patch `configure.ac` to add the missing description in `AC_DEFINE`, fixing the autoreconf errors. --- recipes/jemalloc/all/conanfile.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 783d44d56511b..a97af0698e7f8 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -54,6 +54,17 @@ class JemallocConan(ConanFile): def _settings_build(self): return getattr(self, "settings_build", self.settings) + def add_missing_ac_define_description(self): + # This function patches `configure.ac` to add the missing description in `AC_DEFINE`, + # fixing the error reported by the newer version of `autoreconf` + # Issue: https://github.com/jemalloc/jemalloc/issues/2346 + # PR: https://github.com/jemalloc/jemalloc/pull/2396/files + # Type: Backport + path = os.path.join(self.source_folder, "configure.ac") + find = "AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ])" + repl = "AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ], [ ])" + replace_in_file(self, path, find, repl) + def export_sources(self): export_conandata_patches(self) @@ -139,8 +150,10 @@ def generate(self): tc.generate(env) def build(self): + self.add_missing_ac_define_description() apply_conandata_patches(self) autotools = Autotools(self) + autotools.autoreconf() autotools.configure() autotools.make() From b52218c0a8a737e8970263b9d7df5f0c637a2563 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Thu, 25 May 2023 03:53:04 -0700 Subject: [PATCH 07/28] jemalloc: Add `automake` to the build requirements. --- recipes/jemalloc/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index a97af0698e7f8..b636e4c955dbc 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -83,6 +83,7 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): + self.build_requires("automake/1.16.5") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): From c4a8429116230904d24372af3ed9cfef2e29f9dc Mon Sep 17 00:00:00 2001 From: FireWolf Date: Fri, 26 May 2023 23:37:13 -0700 Subject: [PATCH 08/28] jemalloc: Remove the patch that adds the solution files of MSVC 2019 and 2022. --- recipes/jemalloc/all/conandata.yml | 7 - ...port-for-Visual-Studio-2019-and-2022.patch | 2081 ----------------- 2 files changed, 2088 deletions(-) delete mode 100644 recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch diff --git a/recipes/jemalloc/all/conandata.yml b/recipes/jemalloc/all/conandata.yml index 1030395497e97..01ec764057557 100644 --- a/recipes/jemalloc/all/conandata.yml +++ b/recipes/jemalloc/all/conandata.yml @@ -9,10 +9,3 @@ sources: patches: "5.2.1": - patch_file: "patches/0001-clang12-dont-declare-system-functions-as-nothrow.patch" - - patch_file: "patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch" - patch_type: "backport" - patch_source: "https://github.com/jemalloc/jemalloc/pull/2335" - "5.3.0": - - patch_file: "patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch" - patch_type: "backport" - patch_source: "https://github.com/jemalloc/jemalloc/pull/2335" diff --git a/recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch b/recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch deleted file mode 100644 index c032bb7ccb299..0000000000000 --- a/recipes/jemalloc/all/patches/0002-MSVC-support-for-Visual-Studio-2019-and-2022.patch +++ /dev/null @@ -1,2081 +0,0 @@ -From e8b28908dede2a27530dbaa255af6cbcf579fc31 Mon Sep 17 00:00:00 2001 -From: Fernando Pelliccioni -Date: Fri, 23 Sep 2022 11:34:05 -0300 -Subject: [PATCH] [MSVC] support for Visual Studio 2019 and 2022 - ---- - msvc/jemalloc_vc2019.sln | 63 +++ - msvc/jemalloc_vc2022.sln | 63 +++ - .../projects/vc2019/jemalloc/jemalloc.vcxproj | 379 ++++++++++++++++++ - .../vc2019/jemalloc/jemalloc.vcxproj.filters | 197 +++++++++ - .../vc2019/test_threads/test_threads.vcxproj | 326 +++++++++++++++ - .../test_threads/test_threads.vcxproj.filters | 26 ++ - .../projects/vc2022/jemalloc/jemalloc.vcxproj | 379 ++++++++++++++++++ - .../vc2022/jemalloc/jemalloc.vcxproj.filters | 197 +++++++++ - .../vc2022/test_threads/test_threads.vcxproj | 326 +++++++++++++++ - .../test_threads/test_threads.vcxproj.filters | 26 ++ - 10 files changed, 1982 insertions(+) - create mode 100644 msvc/jemalloc_vc2019.sln - create mode 100644 msvc/jemalloc_vc2022.sln - create mode 100644 msvc/projects/vc2019/jemalloc/jemalloc.vcxproj - create mode 100644 msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters - create mode 100644 msvc/projects/vc2019/test_threads/test_threads.vcxproj - create mode 100644 msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters - create mode 100644 msvc/projects/vc2022/jemalloc/jemalloc.vcxproj - create mode 100644 msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters - create mode 100644 msvc/projects/vc2022/test_threads/test_threads.vcxproj - create mode 100644 msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters - -diff --git a/msvc/jemalloc_vc2019.sln b/msvc/jemalloc_vc2019.sln -new file mode 100644 -index 00000000..871ea9d4 ---- /dev/null -+++ b/msvc/jemalloc_vc2019.sln -@@ -0,0 +1,63 @@ -+ -+Microsoft Visual Studio Solution File, Format Version 12.00 -+# Visual Studio 14 -+VisualStudioVersion = 14.0.24720.0 -+MinimumVisualStudioVersion = 10.0.40219.1 -+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70A99006-6DE9-472B-8F83-4CEE6C616DF3}" -+ ProjectSection(SolutionItems) = preProject -+ ReadMe.txt = ReadMe.txt -+ EndProjectSection -+EndProject -+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jemalloc", "projects\vc2019\jemalloc\jemalloc.vcxproj", "{8D6BB292-9E1C-413D-9F98-4864BDC1514A}" -+EndProject -+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_threads", "projects\vc2019\test_threads\test_threads.vcxproj", "{09028CFD-4EB7-491D-869C-0708DB97ED44}" -+EndProject -+Global -+ GlobalSection(SolutionConfigurationPlatforms) = preSolution -+ Debug|x64 = Debug|x64 -+ Debug|x86 = Debug|x86 -+ Debug-static|x64 = Debug-static|x64 -+ Debug-static|x86 = Debug-static|x86 -+ Release|x64 = Release|x64 -+ Release|x86 = Release|x86 -+ Release-static|x64 = Release-static|x64 -+ Release-static|x86 = Release-static|x86 -+ EndGlobalSection -+ GlobalSection(ProjectConfigurationPlatforms) = postSolution -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.ActiveCfg = Debug|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.Build.0 = Debug|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.ActiveCfg = Debug|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.Build.0 = Debug|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.ActiveCfg = Debug-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.Build.0 = Debug-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.ActiveCfg = Debug-static|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.Build.0 = Debug-static|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.ActiveCfg = Release|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.Build.0 = Release|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.ActiveCfg = Release|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.Build.0 = Release|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.ActiveCfg = Release-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.Build.0 = Release-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.ActiveCfg = Release-static|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.Build.0 = Release-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.ActiveCfg = Debug|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.Build.0 = Debug|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.ActiveCfg = Debug|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.Build.0 = Debug|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.ActiveCfg = Debug-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.Build.0 = Debug-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.ActiveCfg = Debug-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.Build.0 = Debug-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.ActiveCfg = Release|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.Build.0 = Release|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.ActiveCfg = Release|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.Build.0 = Release|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.ActiveCfg = Release-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.Build.0 = Release-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.ActiveCfg = Release-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.Build.0 = Release-static|Win32 -+ EndGlobalSection -+ GlobalSection(SolutionProperties) = preSolution -+ HideSolutionNode = FALSE -+ EndGlobalSection -+EndGlobal -diff --git a/msvc/jemalloc_vc2022.sln b/msvc/jemalloc_vc2022.sln -new file mode 100644 -index 00000000..898574f1 ---- /dev/null -+++ b/msvc/jemalloc_vc2022.sln -@@ -0,0 +1,63 @@ -+ -+Microsoft Visual Studio Solution File, Format Version 12.00 -+# Visual Studio 14 -+VisualStudioVersion = 14.0.24720.0 -+MinimumVisualStudioVersion = 10.0.40219.1 -+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70A99006-6DE9-472B-8F83-4CEE6C616DF3}" -+ ProjectSection(SolutionItems) = preProject -+ ReadMe.txt = ReadMe.txt -+ EndProjectSection -+EndProject -+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jemalloc", "projects\vc2022\jemalloc\jemalloc.vcxproj", "{8D6BB292-9E1C-413D-9F98-4864BDC1514A}" -+EndProject -+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_threads", "projects\vc2022\test_threads\test_threads.vcxproj", "{09028CFD-4EB7-491D-869C-0708DB97ED44}" -+EndProject -+Global -+ GlobalSection(SolutionConfigurationPlatforms) = preSolution -+ Debug|x64 = Debug|x64 -+ Debug|x86 = Debug|x86 -+ Debug-static|x64 = Debug-static|x64 -+ Debug-static|x86 = Debug-static|x86 -+ Release|x64 = Release|x64 -+ Release|x86 = Release|x86 -+ Release-static|x64 = Release-static|x64 -+ Release-static|x86 = Release-static|x86 -+ EndGlobalSection -+ GlobalSection(ProjectConfigurationPlatforms) = postSolution -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.ActiveCfg = Debug|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x64.Build.0 = Debug|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.ActiveCfg = Debug|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug|x86.Build.0 = Debug|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.ActiveCfg = Debug-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x64.Build.0 = Debug-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.ActiveCfg = Debug-static|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Debug-static|x86.Build.0 = Debug-static|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.ActiveCfg = Release|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x64.Build.0 = Release|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.ActiveCfg = Release|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release|x86.Build.0 = Release|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.ActiveCfg = Release-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x64.Build.0 = Release-static|x64 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.ActiveCfg = Release-static|Win32 -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A}.Release-static|x86.Build.0 = Release-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.ActiveCfg = Debug|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x64.Build.0 = Debug|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.ActiveCfg = Debug|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug|x86.Build.0 = Debug|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.ActiveCfg = Debug-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x64.Build.0 = Debug-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.ActiveCfg = Debug-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Debug-static|x86.Build.0 = Debug-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.ActiveCfg = Release|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x64.Build.0 = Release|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.ActiveCfg = Release|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release|x86.Build.0 = Release|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.ActiveCfg = Release-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x64.Build.0 = Release-static|x64 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.ActiveCfg = Release-static|Win32 -+ {09028CFD-4EB7-491D-869C-0708DB97ED44}.Release-static|x86.Build.0 = Release-static|Win32 -+ EndGlobalSection -+ GlobalSection(SolutionProperties) = preSolution -+ HideSolutionNode = FALSE -+ EndGlobalSection -+EndGlobal -diff --git a/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj -new file mode 100644 -index 00000000..66ba849d ---- /dev/null -+++ b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj -@@ -0,0 +1,379 @@ -+ -+ -+ -+ -+ Debug-static -+ Win32 -+ -+ -+ Debug-static -+ x64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Release-static -+ Win32 -+ -+ -+ Release-static -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A} -+ Win32Proj -+ jemalloc -+ -+ -+ -+ DynamicLibrary -+ true -+ v142 -+ MultiByte -+ -+ -+ StaticLibrary -+ true -+ v142 -+ MultiByte -+ -+ -+ DynamicLibrary -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ StaticLibrary -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ DynamicLibrary -+ true -+ v142 -+ MultiByte -+ -+ -+ StaticLibrary -+ true -+ v142 -+ MultiByte -+ -+ -+ DynamicLibrary -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ StaticLibrary -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)d -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-$(PlatformToolset)-$(Configuration) -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-$(PlatformToolset)-$(Configuration) -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)d -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ _REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_NO_PRIVATE_NAMESPACE;JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ 4090;4146;4267;4334 -+ OldStyle -+ false -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ _REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ _REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ 4090;4146;4267;4334 -+ OldStyle -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters -new file mode 100644 -index 00000000..1b43e9f2 ---- /dev/null -+++ b/msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters -@@ -0,0 +1,197 @@ -+ -+ -+ -+ -+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} -+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx -+ -+ -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2019/test_threads/test_threads.vcxproj b/msvc/projects/vc2019/test_threads/test_threads.vcxproj -new file mode 100644 -index 00000000..8471a41e ---- /dev/null -+++ b/msvc/projects/vc2019/test_threads/test_threads.vcxproj -@@ -0,0 +1,326 @@ -+ -+ -+ -+ -+ Debug-static -+ Win32 -+ -+ -+ Debug-static -+ x64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Release-static -+ Win32 -+ -+ -+ Release-static -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {09028CFD-4EB7-491D-869C-0708DB97ED44} -+ Win32Proj -+ test_threads -+ -+ -+ -+ Application -+ true -+ v142 -+ MultiByte -+ -+ -+ Application -+ true -+ v142 -+ MultiByte -+ -+ -+ Application -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ Application -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ Application -+ true -+ v142 -+ MultiByte -+ -+ -+ Application -+ true -+ v142 -+ MultiByte -+ -+ -+ Application -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ Application -+ false -+ v142 -+ true -+ MultiByte -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ true -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ true -+ -+ -+ true -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ -+ -+ true -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ -+ -+ Console -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ _DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ $(SolutionDir)$(Platform)\$(Configuration) -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ -+ -+ Console -+ true -+ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ $(SolutionDir)$(Platform)\$(Configuration) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ -+ -+ -+ -+ {8d6bb292-9e1c-413d-9f98-4864bdc1514a} -+ -+ -+ -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters b/msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters -new file mode 100644 -index 00000000..fa4588fd ---- /dev/null -+++ b/msvc/projects/vc2019/test_threads/test_threads.vcxproj.filters -@@ -0,0 +1,26 @@ -+ -+ -+ -+ -+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} -+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx -+ -+ -+ {93995380-89BD-4b04-88EB-625FBE52EBFB} -+ h;hh;hpp;hxx;hm;inl;inc;xsd -+ -+ -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ -+ -+ Header Files -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj -new file mode 100644 -index 00000000..7d9a1aa0 ---- /dev/null -+++ b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj -@@ -0,0 +1,379 @@ -+ -+ -+ -+ -+ Debug-static -+ Win32 -+ -+ -+ Debug-static -+ x64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Release-static -+ Win32 -+ -+ -+ Release-static -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {8D6BB292-9E1C-413D-9F98-4864BDC1514A} -+ Win32Proj -+ jemalloc -+ -+ -+ -+ DynamicLibrary -+ true -+ v143 -+ MultiByte -+ -+ -+ StaticLibrary -+ true -+ v143 -+ MultiByte -+ -+ -+ DynamicLibrary -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ StaticLibrary -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ DynamicLibrary -+ true -+ v143 -+ MultiByte -+ -+ -+ StaticLibrary -+ true -+ v143 -+ MultiByte -+ -+ -+ DynamicLibrary -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ StaticLibrary -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)d -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-$(PlatformToolset)-$(Configuration) -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-$(PlatformToolset)-$(Configuration) -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)d -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ $(ProjectName)-vc$(PlatformToolsetVersion)-$(Configuration) -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ _REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;JEMALLOC_DEBUG;_DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_NO_PRIVATE_NAMESPACE;JEMALLOC_DEBUG;_REENTRANT;JEMALLOC_EXPORT=;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ 4090;4146;4267;4334 -+ OldStyle -+ false -+ -+ -+ Windows -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ _REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ _REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;_WINDLL;DLLEXPORT;NDEBUG;%(PreprocessorDefinitions) -+ 4090;4146;4267;4334 -+ $(OutputPath)$(TargetName).pdb -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ JEMALLOC_NO_PRIVATE_NAMESPACE;_REENTRANT;JEMALLOC_EXPORT=;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ ..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ 4090;4146;4267;4334 -+ OldStyle -+ -+ -+ Windows -+ true -+ true -+ true -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters -new file mode 100644 -index 00000000..1b43e9f2 ---- /dev/null -+++ b/msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters -@@ -0,0 +1,197 @@ -+ -+ -+ -+ -+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} -+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx -+ -+ -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2022/test_threads/test_threads.vcxproj b/msvc/projects/vc2022/test_threads/test_threads.vcxproj -new file mode 100644 -index 00000000..471f693b ---- /dev/null -+++ b/msvc/projects/vc2022/test_threads/test_threads.vcxproj -@@ -0,0 +1,326 @@ -+ -+ -+ -+ -+ Debug-static -+ Win32 -+ -+ -+ Debug-static -+ x64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Release-static -+ Win32 -+ -+ -+ Release-static -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {09028CFD-4EB7-491D-869C-0708DB97ED44} -+ Win32Proj -+ test_threads -+ -+ -+ -+ Application -+ true -+ v143 -+ MultiByte -+ -+ -+ Application -+ true -+ v143 -+ MultiByte -+ -+ -+ Application -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ Application -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ Application -+ true -+ v143 -+ MultiByte -+ -+ -+ Application -+ true -+ v143 -+ MultiByte -+ -+ -+ Application -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ Application -+ false -+ v143 -+ true -+ MultiByte -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ true -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ true -+ -+ -+ true -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ -+ -+ true -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ false -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ -+ -+ Console -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ _DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ jemallocd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ $(SolutionDir)$(Platform)\$(Configuration) -+ -+ -+ -+ -+ -+ -+ Level3 -+ Disabled -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;_DEBUG;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreadedDebug -+ -+ -+ Console -+ true -+ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ $(SolutionDir)$(Platform)\$(Configuration) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc-$(PlatformToolset)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ Level3 -+ -+ -+ MaxSpeed -+ true -+ true -+ JEMALLOC_EXPORT=;JEMALLOC_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ ..\..\..\..\test\include;..\..\..\..\include;..\..\..\..\include\msvc_compat;%(AdditionalIncludeDirectories) -+ MultiThreaded -+ -+ -+ Console -+ true -+ true -+ true -+ $(SolutionDir)$(Platform)\$(Configuration) -+ jemalloc-vc$(PlatformToolsetVersion)-$(Configuration).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ -+ -+ -+ -+ -+ -+ -+ -+ {8d6bb292-9e1c-413d-9f98-4864bdc1514a} -+ -+ -+ -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters b/msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters -new file mode 100644 -index 00000000..fa4588fd ---- /dev/null -+++ b/msvc/projects/vc2022/test_threads/test_threads.vcxproj.filters -@@ -0,0 +1,26 @@ -+ -+ -+ -+ -+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} -+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx -+ -+ -+ {93995380-89BD-4b04-88EB-625FBE52EBFB} -+ h;hh;hpp;hxx;hm;inl;inc;xsd -+ -+ -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ -+ -+ Header Files -+ -+ -+ -\ No newline at end of file --- -2.39.2 (Apple Git-143) - From 600999f77611645592a5f8ffd9c62d34cb8931e6 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Fri, 26 May 2023 23:37:51 -0700 Subject: [PATCH 09/28] jemalloc: Do not check whether the math library exists when jemalloc is compiled by MSVC. --- recipes/jemalloc/all/conanfile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index b636e4c955dbc..42fb071833a45 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -147,7 +147,12 @@ def generate(self): tc.configure_args.append("--enable-static") env = tc.environment() if str(self.settings.compiler) in ["Visual Studio", "msvc"]: - env.define("CC", "cl.exe") + # Do not check whether the math library exists when compiled by MSVC + # because MSVC treats the function `char log()` as a intrinsic function + # and therefore complains about insufficient arguments passed to the function + tc.configure_args.append("ac_cv_search_log=none required") + env.define("CC", "cl") + env.define("CXX", "cl") tc.generate(env) def build(self): From 884c84afac477010cc4cce75a1a1cbb93a7f8afb Mon Sep 17 00:00:00 2001 From: FireWolf Date: Fri, 26 May 2023 23:48:19 -0700 Subject: [PATCH 10/28] jemalloc: Remove deprecated functions that set the arguments for Autotools. --- recipes/jemalloc/all/conanfile.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 42fb071833a45..e08d98d864315 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -203,36 +203,6 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) - # @property - # def _autotools_args(self): - # conf_args = [ - # "--with-jemalloc-prefix={}".format(self.options.prefix), - # "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", - # "--enable-cxx" if self.options.enable_cxx else "--disable-cxx", - # "--enable-fill" if self.options.enable_fill else "--disable-fill", - # "--enable-xmalloc" if self.options.enable_cxx else "--disable-xmalloc", - # "--enable-readlinkat" if self.options.enable_readlinkat else "--disable-readlinkat", - # "--enable-syscall" if self.options.enable_syscall else "--disable-syscall", - # "--enable-lazy-lock" if self.options.enable_lazy_lock else "--disable-lazy-lock", - # "--enable-log" if self.options.enable_debug_logging else "--disable-log", - # "--enable-initial-exec-tls" if self.options.enable_initial_exec_tls else "--disable-initial-exec-tls", - # "--enable-libdl" if self.options.enable_libdl else "--disable-libdl", - # ] - # if self.options.enable_prof: - # conf_args.append("--enable-prof") - # if self.options.shared: - # conf_args.extend(["--enable-shared", "--disable-static"]) - # else: - # conf_args.extend(["--disable-shared", "--enable-static"]) - # return conf_args - - # def _configure_autotools(self): - # if self._autotools: - # return self._autotools - # self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools_legacy.os_info.is_windows) - # self._autotools.configure(args=self._autotools_args, configure_dir=self.source_folder) - # return self._autotools - # @property # def _msvc_build_type(self): # build_type = str(self.settings.build_type) or "Release" From 40c573f883b77f9f19385cccd57274fb9f96a61c Mon Sep 17 00:00:00 2001 From: FireWolf Date: Fri, 26 May 2023 23:55:00 -0700 Subject: [PATCH 11/28] jemalloc: Revise the function that computes the name of the library and use it to initialize `self.cpp_info.libs`. --- recipes/jemalloc/all/conanfile.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index e08d98d864315..c9e10a0c9390e 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -54,6 +54,17 @@ class JemallocConan(ConanFile): def _settings_build(self): return getattr(self, "settings_build", self.settings) + @property + def _library_name(self): + libname = "jemalloc" + if self.settings.os == "Windows": + if not self.options.shared: + libname += "_s" + else: + if not self.options.shared and self.options.fPIC: + libname += "_pic" + return libname + def add_missing_ac_define_description(self): # This function patches `configure.ac` to add the missing description in `AC_DEFINE`, # fixing the error reported by the newer version of `autoreconf` @@ -193,7 +204,7 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "jemalloc") - self.cpp_info.libs = ["jemalloc"] # TODO: Previously self._library_name + self.cpp_info.libs = [self._library_name] self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), os.path.join(self.package_folder, "include", "jemalloc")] if self.settings.compiler == "msvc": From f5a14a18800389555e1fc151d5c73bba020eedd4 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:44:10 -0700 Subject: [PATCH 12/28] jemalloc: Add the patch file that adds the missing description in `AC_DEFINE` for v5.3.0. --- recipes/jemalloc/all/conandata.yml | 5 +++++ .../0002-add-missing-ac-define-description.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch diff --git a/recipes/jemalloc/all/conandata.yml b/recipes/jemalloc/all/conandata.yml index 01ec764057557..d85fd03af8d18 100644 --- a/recipes/jemalloc/all/conandata.yml +++ b/recipes/jemalloc/all/conandata.yml @@ -9,3 +9,8 @@ sources: patches: "5.2.1": - patch_file: "patches/0001-clang12-dont-declare-system-functions-as-nothrow.patch" + "5.3.0": + - patch_file: "patches/0002-add-missing-ac-define-description.patch" + patch_description: "Patch configure.ac to add the missing description in AC_DEFINE." + patch_type: "backport" + patch_source: "https://github.com/jemalloc/jemalloc/pull/2396" diff --git a/recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch b/recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch new file mode 100644 index 0000000000000..7799dfb9e80e3 --- /dev/null +++ b/recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index f6d25f334..3115504e2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1592,7 +1592,7 @@ fi + [enable_uaf_detection="0"] + ) + if test "x$enable_uaf_detection" = "x1" ; then +- AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ]) ++ AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ], ["enable UAF"]) + fi + AC_SUBST([enable_uaf_detection]) + From 5f83cae31ea111d2c24f2306a2f2390b4918d38b Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:45:23 -0700 Subject: [PATCH 13/28] jemalloc: Remove the function that patches the file `configure.ac`. --- recipes/jemalloc/all/conanfile.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index c9e10a0c9390e..bab339c51193a 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -65,17 +65,6 @@ def _library_name(self): libname += "_pic" return libname - def add_missing_ac_define_description(self): - # This function patches `configure.ac` to add the missing description in `AC_DEFINE`, - # fixing the error reported by the newer version of `autoreconf` - # Issue: https://github.com/jemalloc/jemalloc/issues/2346 - # PR: https://github.com/jemalloc/jemalloc/pull/2396/files - # Type: Backport - path = os.path.join(self.source_folder, "configure.ac") - find = "AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ])" - repl = "AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ], [ ])" - replace_in_file(self, path, find, repl) - def export_sources(self): export_conandata_patches(self) @@ -167,7 +156,6 @@ def generate(self): tc.generate(env) def build(self): - self.add_missing_ac_define_description() apply_conandata_patches(self) autotools = Autotools(self) autotools.autoreconf() From 0f25f78eced0508e5dc15bf24feaf5804dea74ce Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:12:06 -0700 Subject: [PATCH 14/28] jemalloc: Remove deprecated implementation of `package()` and `package_info()`. --- recipes/jemalloc/all/conanfile.py | 35 ------------------------------- 1 file changed, 35 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index bab339c51193a..e5ab7489fef77 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -261,38 +261,3 @@ def package_info(self): # if not self.options.shared and self.options.fPIC: # libname += "_pic" # return libname - - # def package(self): - # self.copy(pattern="COPYING", src=self.source_folder, dst="licenses") - # if self.settings.compiler == "Visual Studio": - # arch_subdir = { - # "x86_64": "x64", - # "x86": "x86", - # }[str(self.settings.arch)] - # self.copy("*.lib", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "lib")) - # self.copy("*.dll", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "bin")) - # self.copy("jemalloc.h", src=os.path.join(self.source_folder, "include", "jemalloc"), dst=os.path.join(self.package_folder, "include", "jemalloc"), keep_path=True) - # shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), - # os.path.join(self.package_folder, "include", "msvc_compat")) - # else: - # autotools = self._configure_autotools() - # # Use install_lib_XXX and install_include to avoid mixing binaries and dll's - # autotools.make(target="install_lib_shared" if self.options.shared else "install_lib_static") - # autotools.make(target="install_include") - # if self.settings.os == "Windows" and self.settings.compiler == "gcc": - # rename(self, os.path.join(self.package_folder, "lib", "{}.lib".format(self._library_name)), - # os.path.join(self.package_folder, "lib", "lib{}.a".format(self._library_name))) - # if not self.options.shared: - # os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) - # - # def package_info(self): - # self.cpp_info.names["pkg_config"] = "jemalloc" - # self.cpp_info.libs = [self._library_name] - # self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), - # os.path.join(self.package_folder, "include", "jemalloc")] - # if self.settings.compiler == "Visual Studio": - # self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "msvc_compat")) - # if not self.options.shared: - # self.cpp_info.defines = ["JEMALLOC_EXPORT="] - # if self.settings.os in ["Linux", "FreeBSD"]: - # self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) From 8ce46f453d0336f6baccf7c1191de96c584c01af Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:14:25 -0700 Subject: [PATCH 15/28] jemalloc: Copy MSVC compatible headers to the package folder. --- recipes/jemalloc/all/conanfile.py | 34 ++++++++++--------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index e5ab7489fef77..0c097dd27869c 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -7,6 +7,7 @@ from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime from conan.tools.scm import Version import os +import shutil required_conan_version = ">=1.54.0" @@ -167,35 +168,22 @@ def package(self): autotools = Autotools(self) autotools.install(target="install_lib_shared" if self.options.shared else "install_lib_static") autotools.install(target="install_include") - - - # if self.settings.compiler == "Visual Studio": - # arch_subdir = { - # "x86_64": "x64", - # "x86": "x86", - # }[str(self.settings.arch)] - # self.copy("*.lib", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "lib")) - # self.copy("*.dll", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "bin")) - # self.copy("jemalloc.h", src=os.path.join(self.source_folder, "include", "jemalloc"), dst=os.path.join(self.package_folder, "include", "jemalloc"), keep_path=True) - # shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), - # os.path.join(self.package_folder, "include", "msvc_compat")) - # else: - # autotools = self._configure_autotools() - # # Use install_lib_XXX and install_include to avoid mixing binaries and dll's - # autotools.make(target="install_lib_shared" if self.options.shared else "install_lib_static") - # autotools.make(target="install_include") - # if self.settings.os == "Windows" and self.settings.compiler == "gcc": - # rename(self, os.path.join(self.package_folder, "lib", "{}.lib".format(self._library_name)), - # os.path.join(self.package_folder, "lib", "lib{}.a".format(self._library_name))) - # if not self.options.shared: - # os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) + # TODO: Verify this + if self.settings.os == "Windows" and self.settings.compiler == "gcc": + rename(self, os.path.join(self.package_folder, "lib", f"{self._library_name}.lib"), + os.path.join(self.package_folder, "lib", f"lib{self._library_name}.a")) + if not self.options.shared: + os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) + if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), + os.path.join(self.package_folder, "include", "msvc_compat")) def package_info(self): self.cpp_info.set_property("pkg_config_name", "jemalloc") self.cpp_info.libs = [self._library_name] self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), os.path.join(self.package_folder, "include", "jemalloc")] - if self.settings.compiler == "msvc": + if str(self.settings.compiler) in ["Visual Studio", "msvc"]: self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "msvc_compat")) if not self.options.shared: self.cpp_info.defines = ["JEMALLOC_EXPORT="] From b1c3d023862b34c17f2a6155ea02358ae5b15d48 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:19:41 -0700 Subject: [PATCH 16/28] jemalloc: Remove the old implementation of `_library_name()`. --- recipes/jemalloc/all/conanfile.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 0c097dd27869c..dd4ac15dc7990 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -229,23 +229,3 @@ def package_info(self): # else: # autotools = self._configure_autotools() # autotools.make() - - # @property - # def _library_name(self): - # libname = "jemalloc" - # if self.settings.compiler == "Visual Studio": - # if self.options.shared: - # if self.settings.build_type == "Debug": - # libname += "d" - # else: - # toolset = tools_legacy.msvs_toolset(self.settings) - # toolset_number = "".join(c for c in toolset if c in string.digits) - # libname += "-vc{}-{}".format(toolset_number, self._msvc_build_type) - # else: - # if self.settings.os == "Windows": - # if not self.options.shared: - # libname += "_s" - # else: - # if not self.options.shared and self.options.fPIC: - # libname += "_pic" - # return libname From db9397c370ffd779d4ff36e80ad1516cda19ea57 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:33:23 -0700 Subject: [PATCH 17/28] jemalloc: Use the helper `is_msvc()` instead of checking the compiler value manually. --- recipes/jemalloc/all/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index dd4ac15dc7990..060bfc9d8d32a 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -4,7 +4,7 @@ from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename, replace_in_file -from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime +from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os import shutil @@ -92,7 +92,7 @@ def build_requirements(self): def validate(self): # 1. MSVC specific checks - if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + if is_msvc(self): # The upstream repository provides solution files for Visual Studio 2015, 2017, 2019 and 2022, # but the 2015 solution does not work properly due to unresolved external symbols: # `test_hooks_libc_hook` and `test_hooks_arena_new_hook` @@ -147,7 +147,7 @@ def generate(self): tc.configure_args.append("--disable-shared") tc.configure_args.append("--enable-static") env = tc.environment() - if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + if is_msvc(self): # Do not check whether the math library exists when compiled by MSVC # because MSVC treats the function `char log()` as a intrinsic function # and therefore complains about insufficient arguments passed to the function @@ -174,7 +174,7 @@ def package(self): os.path.join(self.package_folder, "lib", f"lib{self._library_name}.a")) if not self.options.shared: os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) - if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + if is_msvc(self): shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), os.path.join(self.package_folder, "include", "msvc_compat")) @@ -183,7 +183,7 @@ def package_info(self): self.cpp_info.libs = [self._library_name] self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), os.path.join(self.package_folder, "include", "jemalloc")] - if str(self.settings.compiler) in ["Visual Studio", "msvc"]: + if is_msvc(self): self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "msvc_compat")) if not self.options.shared: self.cpp_info.defines = ["JEMALLOC_EXPORT="] From baf93a47c1db3ba0e450208cc5eeb24bda545776 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:35:07 -0700 Subject: [PATCH 18/28] jemalloc: Remove the old implementation of `build()`. --- recipes/jemalloc/all/conanfile.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 060bfc9d8d32a..e5ed10823e669 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -212,20 +212,3 @@ def package_info(self): # "\t$(INSTALL) -m 644 $(objroot)lib/libjemalloc.a $(LIBDIR)", strict=False) # # apply_conandata_patches(self) - - - # def build(self): - # self._patch_sources() - # if self.settings.compiler == "Visual Studio": - # with tools_legacy.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): - # with tools_legacy.environment_append({"CC": "cl", "CXX": "cl"}) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): - # with tools_legacy.chdir(self.source_folder): - # # Do not use AutoToolsBuildEnvironment because we want to run configure as ./configure - # self.run("./configure {}".format(" ".join(self._autotools_args)), win_bash=tools_legacy.os_info.is_windows) - # msbuild = MSBuild(self) - # # Do not use the 2015 solution: unresolved external symbols: test_hooks_libc_hook and test_hooks_arena_new_hook - # sln_file = os.path.join(self.source_folder, "msvc", "jemalloc_vc2017.sln") - # msbuild.build(sln_file, targets=["jemalloc"], build_type=self._msvc_build_type) - # else: - # autotools = self._configure_autotools() - # autotools.make() From 67014586ab056c4094478ae07d30b79cca8a475e Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 00:46:40 -0700 Subject: [PATCH 19/28] jemalloc: Remove the deprecated function `_msvc_build_type()`. --- recipes/jemalloc/all/conanfile.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index e5ed10823e669..05f0ef5af56b7 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -190,13 +190,6 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) - # @property - # def _msvc_build_type(self): - # build_type = str(self.settings.build_type) or "Release" - # if not self.options.shared: - # build_type += "-static" - # return build_type - # def _patch_sources(self): # TODO: Is this necessary??? # if self.settings.os == "Windows": # makefile_in = os.path.join(self.source_folder, "Makefile.in") From c18e32e9e5d07d9829c73c31238aa4effdc4174c Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 01:25:37 -0700 Subject: [PATCH 20/28] jemalloc: No need to call `autoreconf`. --- recipes/jemalloc/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 05f0ef5af56b7..dae4f77cb0130 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -159,7 +159,6 @@ def generate(self): def build(self): apply_conandata_patches(self) autotools = Autotools(self) - autotools.autoreconf() autotools.configure() autotools.make() From d69bdf63fdcbb7767c9b7afba0ea0a3b3cf75a21 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 02:07:18 -0700 Subject: [PATCH 21/28] jemalloc: Add the missing CXX flags for MSVC. --- recipes/jemalloc/all/conandata.yml | 4 ++++ .../0003-add-missing-cpp-flags-for-windows.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch diff --git a/recipes/jemalloc/all/conandata.yml b/recipes/jemalloc/all/conandata.yml index d85fd03af8d18..25973b37d0840 100644 --- a/recipes/jemalloc/all/conandata.yml +++ b/recipes/jemalloc/all/conandata.yml @@ -14,3 +14,7 @@ patches: patch_description: "Patch configure.ac to add the missing description in AC_DEFINE." patch_type: "backport" patch_source: "https://github.com/jemalloc/jemalloc/pull/2396" + - patch_file: "patches/0003-add-missing-cpp-flags-for-windows.patch" + patch_description: "Add the missing compiler flags for MSVC on Windows." + patch_type: "backport" + patch_source: "https://github.com/jemalloc/jemalloc/issues/2283" diff --git a/recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch b/recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch new file mode 100644 index 0000000000000..6e6e2d1403fb2 --- /dev/null +++ b/recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index 3115504e2..ffb504b08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -749,6 +749,7 @@ case "${host}" in + so="dll" + if test "x$je_cv_msvc" = "xyes" ; then + importlib="lib" ++ JE_APPEND_VS(CPPFLAGS, -DJEMALLOC_NO_PRIVATE_NAMESPACE) + DSO_LDFLAGS="-LD" + EXTRA_LDFLAGS="-link -DEBUG" + CTARGET='-Fo$@' From 3083dc381575b6dab396a92841d11a8c0e748624 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 02:38:46 -0700 Subject: [PATCH 22/28] jemalloc: Support for Apple Silicon Macs is only available as of 5.3.0. --- recipes/jemalloc/all/conanfile.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index dae4f77cb0130..7d861509de49c 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -113,10 +113,10 @@ def validate(self): # 3. Verify the build type if self.settings.build_type not in ("Release", "Debug", None): raise ConanInvalidConfiguration("Only Release and Debug builds are supported.") - - # jemalloc seems to support Apple Silicon Macs (Reference: Homebrew) - # if self.settings.os == "Macos" and self.settings.arch not in ("x86_64", "x86"): - # raise ConanInvalidConfiguration("Unsupported arch") + # 4: Apple Silicon specific checks + if self.settings.os == "Macos" and self.settings.arch == "armv8": + if Version(self.version) < "5.3.0": + raise ConanInvalidConfiguration("Support for Apple Silicon is only available as of 5.3.0.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -167,7 +167,6 @@ def package(self): autotools = Autotools(self) autotools.install(target="install_lib_shared" if self.options.shared else "install_lib_static") autotools.install(target="install_include") - # TODO: Verify this if self.settings.os == "Windows" and self.settings.compiler == "gcc": rename(self, os.path.join(self.package_folder, "lib", f"{self._library_name}.lib"), os.path.join(self.package_folder, "lib", f"lib{self._library_name}.a")) From 6e4fdd55fe93aa2fec21a075fb8f2e54d18da38f Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 02:39:07 -0700 Subject: [PATCH 23/28] jemalloc: Remove unneeded `_patch_sources()` function. --- recipes/jemalloc/all/conanfile.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 7d861509de49c..0b4ee748bc390 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -187,19 +187,3 @@ def package_info(self): self.cpp_info.defines = ["JEMALLOC_EXPORT="] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) - - # def _patch_sources(self): # TODO: Is this necessary??? - # if self.settings.os == "Windows": - # makefile_in = os.path.join(self.source_folder, "Makefile.in") - # replace_in_file(self, makefile_in, - # "DSO_LDFLAGS = @DSO_LDFLAGS@", - # "DSO_LDFLAGS = @DSO_LDFLAGS@ -Wl,--out-implib,lib/libjemalloc.a", strict=False) - # replace_in_file(self, makefile_in, - # "\t$(INSTALL) -d $(LIBDIR)\n" - # "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)", - # "\t$(INSTALL) -d $(BINDIR)\n" - # "\t$(INSTALL) -d $(LIBDIR)\n" - # "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(BINDIR)\n" - # "\t$(INSTALL) -m 644 $(objroot)lib/libjemalloc.a $(LIBDIR)", strict=False) - # - # apply_conandata_patches(self) From a477802568e7c0b6922d459abbcfb59049b1bc7f Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 27 May 2023 03:14:35 -0700 Subject: [PATCH 24/28] jemalloc: Fix the linter warnings. --- recipes/jemalloc/all/conandata.yml | 2 ++ recipes/jemalloc/all/conanfile.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/jemalloc/all/conandata.yml b/recipes/jemalloc/all/conandata.yml index 25973b37d0840..d4bd61a7e3212 100644 --- a/recipes/jemalloc/all/conandata.yml +++ b/recipes/jemalloc/all/conandata.yml @@ -9,6 +9,8 @@ sources: patches: "5.2.1": - patch_file: "patches/0001-clang12-dont-declare-system-functions-as-nothrow.patch" + patch_description: "Remove nothrow from system function declarations on macOS and FreeBSD." + patch_type: "backport" "5.3.0": - patch_file: "patches/0002-add-missing-ac-define-description.patch" patch_description: "Patch configure.ac to add the missing description in AC_DEFINE." diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 0b4ee748bc390..e14e1ae375e02 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.env import VirtualBuildEnv from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout -from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename, replace_in_file +from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -109,7 +109,7 @@ def validate(self): raise ConanInvalidConfiguration("Clang 3.9 or earlier is not supported.") if self.options.enable_cxx and self.settings.compiler.get_safe("libcxx") == "libc++" and \ Version(self.settings.compiler.version) < "10": - raise ConanInvalidConfiguration(f"Clang 9 or earlier with libc++ is not supported due to the missing mutex implementation.") + raise ConanInvalidConfiguration("Clang 9 or earlier with libc++ is not supported due to the missing mutex implementation.") # 3. Verify the build type if self.settings.build_type not in ("Release", "Debug", None): raise ConanInvalidConfiguration("Only Release and Debug builds are supported.") From 75339557566982c3d00d786ade8cd8b771bccd0d Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sat, 3 Jun 2023 18:10:16 -0700 Subject: [PATCH 25/28] jemalloc: No need to set the configuration arguments `--enable-shared/static` manually. --- recipes/jemalloc/all/conanfile.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index e14e1ae375e02..37e71dac95b4f 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -140,12 +140,6 @@ def generate(self): ]) if self.options.enable_prof: tc.configure_args.append("--enable-prof") - if self.options.shared: - tc.configure_args.append("--enable-shared") - tc.configure_args.append("--disable-static") - else: - tc.configure_args.append("--disable-shared") - tc.configure_args.append("--enable-static") env = tc.environment() if is_msvc(self): # Do not check whether the math library exists when compiled by MSVC From 4fbd12f8e1d378d2ac87ca7486d4fea8dbb35128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Dzi=C4=99gielewski?= Date: Wed, 19 Jul 2023 23:52:06 +0200 Subject: [PATCH 26/28] adds forcing vaddr setting on x86_64/arm64/armv8 - workaround for https://github.com/jemalloc/jemalloc/issues/2318 --- recipes/jemalloc/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 37e71dac95b4f..4178ff4c29cc9 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -137,7 +137,9 @@ def generate(self): "--enable-log" if self.options.enable_debug_logging else "--disable-log", "--enable-initial-exec-tls" if self.options.enable_initial_exec_tls else "--disable-initial-exec-tls", "--enable-libdl" if self.options.enable_libdl else "--disable-libdl", + "--with-lg-vaddr=48" if self.settings.arch in ['x86_64', 'arm64', 'armv8'] else '', ]) + if self.options.enable_prof: tc.configure_args.append("--enable-prof") env = tc.environment() From 4d1b6dacc995755547023dfed4910703a9ce6a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Dzi=C4=99gielewski?= Date: Wed, 19 Jul 2023 23:52:06 +0200 Subject: [PATCH 27/28] adds forcing vaddr setting on x86_64/arm64/armv8 - workaround for https://github.com/jemalloc/jemalloc/issues/2318 --- recipes/jemalloc/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 4178ff4c29cc9..15d8e8cb35b15 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -137,7 +137,7 @@ def generate(self): "--enable-log" if self.options.enable_debug_logging else "--disable-log", "--enable-initial-exec-tls" if self.options.enable_initial_exec_tls else "--disable-initial-exec-tls", "--enable-libdl" if self.options.enable_libdl else "--disable-libdl", - "--with-lg-vaddr=48" if self.settings.arch in ['x86_64', 'arm64', 'armv8'] else '', + "--with-lg-vaddr=48" if self.settings.arch in ['x86_64', 'armv8', 'armv8.3'] else '', ]) if self.options.enable_prof: From 0675bbd769e08db6b705f7826463582323912ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Fri, 15 Sep 2023 12:23:37 +0200 Subject: [PATCH 28/28] Add package_type, fix xmalloc --- recipes/jemalloc/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 15d8e8cb35b15..a5e3bbdb4c325 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -19,6 +19,8 @@ class JemallocConan(ConanFile): license = "BSD-2-Clause" homepage = "https://jemalloc.net/" topics = ("conan", "jemalloc", "malloc", "free") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -130,7 +132,7 @@ def generate(self): "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", "--enable-cxx" if self.options.enable_cxx else "--disable-cxx", "--enable-fill" if self.options.enable_fill else "--disable-fill", - "--enable-xmalloc" if self.options.enable_cxx else "--disable-xmalloc", + "--enable-xmalloc" if self.options.enable_xmalloc else "--disable-xmalloc", "--enable-readlinkat" if self.options.enable_readlinkat else "--disable-readlinkat", "--enable-syscall" if self.options.enable_syscall else "--disable-syscall", "--enable-lazy-lock" if self.options.enable_lazy_lock else "--disable-lazy-lock",