diff options
| author | Albert Cervin <albert@acervin.com> | 2024-03-07 21:56:36 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-03-07 21:56:36 +0100 |
| commit | cd87d88a930a0b58cfca38678d2e757491c17b26 (patch) | |
| tree | 412352d2ae67b6e64df6320d64a3cfeda0194b88 /Makefile | |
| parent | a13750209b3836a4a6a16a7ba881625f397f160f (diff) | |
| download | dged-cd87d88a930a0b58cfca38678d2e757491c17b26.tar.gz dged-cd87d88a930a0b58cfca38678d2e757491c17b26.tar.xz dged-cd87d88a930a0b58cfca38678d2e757491c17b26.zip | |
Fix asan errors
It found some really nasty ones :)
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -37,6 +37,13 @@ datadir = $(prefix)/share/dged CFLAGS += -Werror -g -O2 -std=c99 -I $(.CURDIR)/src -I $(.CURDIR)/src/main -DDATADIR="$(datadir)" +ASAN ?= false + +.if $(ASAN:tl) == true +CFLAGS += -fsanitize=address -fno-omit-frame-pointer +LDFLAGS += -fsanitize=address +.endif + .if $(SYNTAX_ENABLE:tl) == true HEADERS += src/dged/syntax.h SOURCES += src/dged/syntax.c @@ -73,7 +80,7 @@ FILES = $(DEPS) $(MAIN_OBJS) $(OBJS) dged libdged.a $(TEST_OBJS) $(PLATFORM_OBJS grammars: if [ -n "$$TREESITTER_GRAMMARS" ]; then \ IFS=":"; for p in "$$TREESITTER_GRAMMARS"; do \ - cp -rL "$$p"/ grammars; \ + cp -rL --no-preserve=mode "$$p"/ grammars; \ done \ else \ @echo "TODO: download and build default set of grammars"; \ |
