Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jemalloc conan2 #18690

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7aeb3bd
jemalloc: Make the recipe compatible with Conan 2.x.
0xFireWolf May 25, 2023
1400c60
jemalloc: Add the patch that adds support for Visual Studio 2019 and …
0xFireWolf May 25, 2023
aef9753
jemalloc: Revise the implementation of `validate()`.
0xFireWolf May 25, 2023
7d5beaf
jemalloc: Define the env variable `CC` if jemalloc is compiled by MSVC.
0xFireWolf May 25, 2023
41d0cc4
jemalloc: Fix the typo.
0xFireWolf May 25, 2023
db28d85
jemalloc: Patch `configure.ac` to add the missing description in `AC_…
0xFireWolf May 25, 2023
b52218c
jemalloc: Add `automake` to the build requirements.
0xFireWolf May 25, 2023
c4a8429
jemalloc: Remove the patch that adds the solution files of MSVC 2019 …
0xFireWolf May 27, 2023
600999f
jemalloc: Do not check whether the math library exists when jemalloc …
0xFireWolf May 27, 2023
884c84a
jemalloc: Remove deprecated functions that set the arguments for Auto…
0xFireWolf May 27, 2023
40c573f
jemalloc: Revise the function that computes the name of the library a…
0xFireWolf May 27, 2023
f5a14a1
jemalloc: Add the patch file that adds the missing description in `AC…
0xFireWolf May 27, 2023
5f83cae
jemalloc: Remove the function that patches the file `configure.ac`.
0xFireWolf May 27, 2023
0f25f78
jemalloc: Remove deprecated implementation of `package()` and `packag…
0xFireWolf May 27, 2023
8ce46f4
jemalloc: Copy MSVC compatible headers to the package folder.
0xFireWolf May 27, 2023
b1c3d02
jemalloc: Remove the old implementation of `_library_name()`.
0xFireWolf May 27, 2023
db9397c
jemalloc: Use the helper `is_msvc()` instead of checking the compiler…
0xFireWolf May 27, 2023
baf93a4
jemalloc: Remove the old implementation of `build()`.
0xFireWolf May 27, 2023
6701458
jemalloc: Remove the deprecated function `_msvc_build_type()`.
0xFireWolf May 27, 2023
c18e32e
jemalloc: No need to call `autoreconf`.
0xFireWolf May 27, 2023
d69bdf6
jemalloc: Add the missing CXX flags for MSVC.
0xFireWolf May 27, 2023
3083dc3
jemalloc: Support for Apple Silicon Macs is only available as of 5.3.0.
0xFireWolf May 27, 2023
6e4fdd5
jemalloc: Remove unneeded `_patch_sources()` function.
0xFireWolf May 27, 2023
a477802
jemalloc: Fix the linter warnings.
0xFireWolf May 27, 2023
7533955
jemalloc: No need to set the configuration arguments `--enable-shared…
0xFireWolf Jun 4, 2023
4fbd12f
adds forcing vaddr setting on x86_64/arm64/armv8 - workaround for htt…
jabbas Jul 19, 2023
4d1b6da
adds forcing vaddr setting on x86_64/arm64/armv8 - workaround for htt…
jabbas Jul 19, 2023
0675bbd
Add package_type, fix xmalloc
AbrilRBS Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions recipes/jemalloc/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@
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":

Check warning on line 14 in recipes/jemalloc/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 14)
- 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"

Check warning on line 18 in recipes/jemalloc/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 18)
- 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"

Check warning on line 22 in recipes/jemalloc/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 22)
243 changes: 102 additions & 141 deletions recipes/jemalloc/all/conanfile.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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])

Original file line number Diff line number Diff line change
@@ -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$@'
9 changes: 4 additions & 5 deletions recipes/jemalloc/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
21 changes: 15 additions & 6 deletions recipes/jemalloc/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
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)
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)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")
8 changes: 8 additions & 0 deletions recipes/jemalloc/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
17 changes: 17 additions & 0 deletions recipes/jemalloc/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -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)