summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-06-02 04:14:48 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-06-02 04:14:48 -0700
commit2ebc14b69c7aab2457123c831fc51286cbc62de0 (patch)
tree28972613b9b4901ead0430a49486b7011364eb62 /web
parent823b81363a1145de4b8660153007b11faf4e2c56 (diff)
downloaddartboat-master.tar.gz
dartboat-master.tar.xz
web: add debug build to MakefileHEADmaster
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