Skip to content

Commit

Permalink
snmalloc: disable when _FORTIFY_SOURCE or _GLIBCXX_ASSERTIONS are there.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jan 18, 2025
1 parent 11ef87a commit 522cd68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions 3rdparty/mimalloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ if(SCORE_HAS_SANITIZERS)
return()
endif()

if("${CMAKE_CXX_FLAGS}" MATCHES ".*_FORTIFY_SOURCE.*")
return()
endif()
if("${CMAKE_CXX_FLAGS}" MATCHES ".*_GLIBCXX_ASSERTIONS.*")
return()
endif()

if(SCORE_USE_SYSTEM_LIBRARIES)
find_package(snmalloc GLOBAL CONFIG)
else()
block()
set(SNMALLOC_BUILD_TESTING OFF CACHE INTERNAL "" FORCE)
add_subdirectory(3rdparty/snmalloc SYSTEM)
set(SNMALLOC_BUILD_TESTING
OFF
CACHE INTERNAL "" FORCE)
add_subdirectory(3rdparty/snmalloc SYSTEM)
endblock()
endif()
2 changes: 1 addition & 1 deletion 3rdparty/snmalloc
Submodule snmalloc updated 126 files

0 comments on commit 522cd68

Please sign in to comment.