diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-07-28 10:32:58 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-07-28 10:32:58 +0100 |
commit | f2720449b3ede0299da61dfaff9fce6b8db78f75 (patch) | |
tree | 24b1aae845d817230b0db04a5db27e974597b378 /makefiles/Makefile.gcc | |
parent | 0d348add42028c233efead8ea6ce45503fe29c35 (diff) | |
download | buildsystem-f2720449b3ede0299da61dfaff9fce6b8db78f75.tar.gz buildsystem-f2720449b3ede0299da61dfaff9fce6b8db78f75.tar.bz2 |
Enable sanitize target for new gccs and clang
Diffstat (limited to 'makefiles/Makefile.gcc')
-rw-r--r-- | makefiles/Makefile.gcc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/makefiles/Makefile.gcc b/makefiles/Makefile.gcc index 5f2bd4d..6ca7ba1 100644 --- a/makefiles/Makefile.gcc +++ b/makefiles/Makefile.gcc @@ -49,6 +49,17 @@ ifeq ($(MAKECMDGOALS),profile) LDFLAGS := $(LDFLAGS) $(PROFLDFLAGS) endif +# Extensions for sanitize target +ifeq ($(MAKECMDGOALS),sanitize) + SANCFLAGS ?= -fsanitize=address -fsanitize=undefined -fno-sanitize-recover + SANCXXFLAGS ?= -fsanitize=address -fsanitize=undefined -fno-sanitize-recover + SANLDFLAGS ?= -fsanitize=address -fsanitize=undefined -fno-sanitize-recover + + CFLAGS := $(CFLAGS) $(SANCFLAGS) + CXXFLAGS := $(CXXFLAGS) $(SANCXXFLAGS) + LDFLAGS := $(LDFLAGS) $(SANLDFLAGS) +endif + # RISC OS module extensions ifeq ($(COMPONENT_TYPE),riscos-module) ifneq ($(HOST),arm-unknown-riscos) |