summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/Makefile b/web/Makefile
index aa2666a..5fd3a24 100644
--- a/web/Makefile
+++ b/web/Makefile
@@ -12,6 +12,16 @@ SRC := $(wildcard *.c) ../comp.c ../match.c ../board.c ../checkouts.c
all: $(TARGET)
+debug: CFLAGS := $(filter-out -O3,$(CFLAGS)) \
+ -fsanitize=address,undefined \
+ -gsource-map \
+ -sALLOW_MEMORY_GROWTH=1 \
+ -sASSERTIONS=2
+comma := ,
+debug: CFLAGS := $(patsubst -sEXPORTED_FUNCTIONS=%,-sEXPORTED_FUNCTIONS=$\
+ %$(comma)___lsan_do_recoverable_leak_check,$(CFLAGS))
+debug: $(TARGET)
+
$(TARGET): $(SRC)
mkdir $(TARGET)
$(CC) $(CFLAGS) $^ -o $(TARGET)/dartboat_wasm.js