diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-06-02 04:14:48 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-06-02 04:14:48 -0700 |
commit | 2ebc14b69c7aab2457123c831fc51286cbc62de0 (patch) | |
tree | 28972613b9b4901ead0430a49486b7011364eb62 /web | |
parent | 823b81363a1145de4b8660153007b11faf4e2c56 (diff) | |
download | dartboat-2ebc14b69c7aab2457123c831fc51286cbc62de0.tar.gz dartboat-2ebc14b69c7aab2457123c831fc51286cbc62de0.tar.xz |
Diffstat (limited to 'web')
-rw-r--r-- | web/Makefile | 10 |
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 |