mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
added makefile define SANITIZE to specify the sanitizer to use (supported by latest GCC and clang versions) / added additional library necessary to link with clang on linux (nw)
This commit is contained in:
parent
78c8555f22
commit
e7c50f6019
13
makefile
13
makefile
@ -247,6 +247,9 @@ BUILD_MIDILIB = 1
|
||||
# uncomment next line to generate verbose build information
|
||||
# VERBOSE = 1
|
||||
|
||||
# specify the sanitizer to use or leave empty to use none
|
||||
# SANITIZE =
|
||||
|
||||
# specify optimization level or leave commented to use the default
|
||||
# (default is OPTIMIZE = 3 normally, or OPTIMIZE = 0 with symbols)
|
||||
# OPTIMIZE = 3
|
||||
@ -528,6 +531,9 @@ CCOMFLAGS += \
|
||||
-Wno-self-assign-field
|
||||
endif
|
||||
|
||||
ifdef SANITIZE
|
||||
CCOMFLAGS += -fsanitize=$(SANITIZE)
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
# include paths
|
||||
@ -594,6 +600,9 @@ ifdef MAP
|
||||
LDFLAGSEMULATOR += -Wl,-Map,$(FULLNAME).map
|
||||
endif
|
||||
|
||||
ifdef SANITIZE
|
||||
LDFLAGS += -fsanitize=$(SANITIZE)
|
||||
endif
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
@ -684,6 +693,10 @@ LIBS += -lportmidi
|
||||
MIDI_LIB =
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
LIBS += -lstdc++ -lpthread
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
# 'default' target needs to go here, before the
|
||||
# include files which define additional targets
|
||||
|
Loading…
Reference in New Issue
Block a user