Skip to content

Do not link directly with libc #311

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

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions src/pool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ endif()
# libumf_pool_jemalloc
if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
if(LINUX)
# TODO: we link directly with libc to force using malloc from glibc
# This is a temporary fix for https://github.com/oneapi-src/unified-memory-framework/issues/161
add_umf_library(NAME jemalloc_pool
TYPE STATIC
SRCS pool_jemalloc.c ${POOL_EXTRA_SRCS}
LIBS c jemalloc umf_utils)
LIBS jemalloc umf_utils)
target_compile_definitions(jemalloc_pool PUBLIC ${POOL_COMPILE_DEFINITIONS})
add_library(${PROJECT_NAME}::jemalloc_pool ALIAS jemalloc_pool)
install(TARGETS jemalloc_pool
Expand Down
4 changes: 1 addition & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ endif()

if(UMF_BUILD_OS_MEMORY_PROVIDER)
if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
# TODO: we link directly with libc to force using malloc from glibc
# This is a temporary fix for https://github.com/oneapi-src/unified-memory-framework/issues/161
add_umf_test(NAME jemalloc_pool
SRCS pools/jemalloc_pool.cpp malloc_compliance_tests.cpp
LIBS c jemalloc_pool)
LIBS jemalloc_pool)
endif()
else()
message(STATUS "The jemalloc_pool test is DISABLED, because it uses OS_MEMORY_PROVIDER, while the UMF_BUILD_OS_MEMORY_PROVIDER option is set to OFF")
Expand Down