~ajpaon/squell

290c532ccf5f16283a619699704bb0c0f9179aea — Andrew Paon 10 months ago d2cef6d
enable ubsan and asan in debug build
2 files changed, 15 insertions(+), 2 deletions(-)

M README.md
M makefile
M README.md => README.md +14 -1
@@ 27,7 27,20 @@ sudo make uninstall
PREFIX=~/.local make install
PREFIX=~/.local make uninstall

# run the game
# run the game (must be from $HOME)
cd
squell
```

### Debug build

```
make debug
```

This builds squell with debug symbols, asan, and ubsan. On my system I need to
update `LD_LIBRARY_PATH` to get asan to work

```
LD_LIBRARY_PATH=/usr/lib/clang/15.0.7/lib/linux/ gdb ./src/squell/squell
```

M makefile => makefile +1 -1
@@ 6,7 6,7 @@ BINDIR=$(PREFIX)/bin

all: release

debug: CFLAGS=-Wall --debug
debug: CFLAGS=-Wall --debug -fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -shared-libasan
debug: squell

release: CFLAGS=-Wall -O2