Refactor new/delete overrides (#660)

Produce static library that only overrides new and delete. This allows for a static library to be added that only overrides new and delete.
This commit is contained in:
Matthew Parkinson
2024-06-06 10:23:12 +01:00
committed by GitHub
parent 846a926155
commit 2dba088d24
2 changed files with 10 additions and 10 deletions

View File

@@ -447,9 +447,11 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
endfunction()
set(SHIM_FILES src/snmalloc/override/new.cc)
set(SHIM_FILES src/snmalloc/override/malloc.cc src/snmalloc/override/new.cc)
set(SHIM_FILES_MEMCPY src/snmalloc/override/memcpy.cc)
add_shim(snmalloc-new-override STATIC src/snmalloc/override/new.cc)
if (SNMALLOC_STATIC_LIBRARY)
add_shim(snmallocshim-static STATIC ${SHIM_FILES})
target_compile_definitions(snmallocshim-static PRIVATE