CMake: ported missing cmake updates which prevented jemalloc from building

This commit is contained in:
Ovahlord committed 2025-07-30 21:47:38 +02:00
1 parent f95a8bfdca
commit 4bc19db799
2 files changed
+6 -8

No files matched your search

-2
View File
@@ -8,8 +8,6 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
include(CheckSymbolExists)
set(strtod_l_headers stdlib.h) set(strtod_l_headers stdlib.h)
if (APPLE) if (APPLE)
+6 -6
View File
@@ -8,9 +8,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
include(CheckSymbolExists)
if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM) if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM)
# We need to generate the jemalloc_def.h header based on platform-specific settings # We need to generate the jemalloc_def.h header based on platform-specific settings
CHECK_SYMBOL_EXISTS(MADV_FREE "sys/mman.h" HAVE_MADV_FREE) check_symbol_exists(MADV_FREE "sys/mman.h" HAVE_MADV_FREE)
if (PLATFORM EQUAL 32) if (PLATFORM EQUAL 32)
set(JEM_SIZEDEF 2) set(JEM_SIZEDEF 2)
@@ -28,7 +30,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM)
set(JEM_MADFREE_DEF "#undef") set(JEM_MADFREE_DEF "#undef")
endif() endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") if(TRINITY_SYSTEM_PROCESSOR MATCHES "arm")
set(JEM_CPU_SPINWAIT "") set(JEM_CPU_SPINWAIT "")
set(JEM_HAVE_CPU_SPINWAIT 0) set(JEM_HAVE_CPU_SPINWAIT 0)
else() else()
@@ -89,11 +91,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM)
${CMAKE_CURRENT_SOURCE_DIR}/include) ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_compile_definitions(jemalloc target_compile_definitions(jemalloc
PUBLIC
-DNO_BUFFERPOOL
PRIVATE PRIVATE
-D_GNU_SOURCE _GNU_SOURCE
-D_REENTRAN) _REENTRAN)
target_link_libraries(jemalloc target_link_libraries(jemalloc
PRIVATE PRIVATE