add USELTO and USEASAN make flags
to compile with LTO or Address sanitizer
This commit is contained in:
1 parent
b1d8930b5a
commit
76503edfeb
1 file changed
+18
-3
+18
-3
@@ -452,10 +452,25 @@ else
|
||||
|
||||
# build a normal optimised version
|
||||
WINDRESFLAGS = -DNDEBUG
|
||||
CFLAGS+=-O3 -flto=auto
|
||||
CPPFLAGS+=-O3 -flto=auto
|
||||
#LDFLAGS+=-fsanitize=address
|
||||
CFLAGS+=-O3
|
||||
CPPFLAGS+=-O3
|
||||
endif
|
||||
|
||||
ifndef DEBUGMODE
|
||||
ifdef USELTO
|
||||
# compile with LTO
|
||||
CFLAGS+=-flto=auto
|
||||
CPPFLAGS+=-flto=auto
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USEASAN
|
||||
# compile with asan
|
||||
CFLAGS+=-fsanitize=address
|
||||
CPPFLAGS+=-fsanitize=address
|
||||
LDFLAGS+=-fsanitize=address
|
||||
endif
|
||||
|
||||
CFLAGS+=-g $(OPTS) $(ARCHOPTS) $(WINDRESFLAGS)
|
||||
|
||||
ifdef PROFILEMODE
|
||||
|
||||
Reference in new issue
Block a user