Update makefile
This commit is contained in:
parent
7622aa74a6
commit
1b884a9a48
4
makefile
4
makefile
@ -130,11 +130,11 @@ else
|
||||
ifeq ($(MEMCHK),1)
|
||||
#use asan to check memory leaks/invalid accesses
|
||||
LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||
COMPILER_FLAGS+=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DOUR_DICK_DISABLE_NOTHROW_ALLOCATE
|
||||
COMPILER_FLAGS+=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DOUR_DICK_DISABLE_NOTHROW_ALLOCATE -DENABLE_MEMCHK=1
|
||||
endif
|
||||
ifeq ($(UNDEFCHK),1)
|
||||
LDFLAGS+=-fsanitize=undefined
|
||||
COMPILER_FLAGS+=-fsanitize=undefined
|
||||
COMPILER_FLAGS+=-fsanitize=undefined -DENABLE_UNDEFCHK=1
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#include <cstdlib> //malloc, free
|
||||
#include <new>
|
||||
|
||||
#ifndef OUR_DICK_DISABLE_NOTHROW_ALLOCATE
|
||||
#ifndef ENABLE_MEMCHK
|
||||
void* operator new(size_t newsize){
|
||||
return std::malloc(newsize);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user