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:
committed by
GitHub
parent
846a926155
commit
2dba088d24
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user