Skip to content

Commit

Permalink
fix: switch on mem debug in tinycc when asan and improve checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Dec 23, 2024
1 parent 2ed826b commit e5d46fd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ tinycc_config += --with-selinux
endif

ifdef ASAN
cflags := -Og -ggdb -DDEBUG=1 -fno-omit-frame-pointer -fsanitize=address
ASAN_FLAGS := -fsanitize=address -fsanitize=leak
ASAN_FLAGS += -fsanitize=float-divide-by-zero
ASAN_FLAGS += -fsanitize=float-cast-overflow
cflags := -g -DDEBUG=1 -Wall -fno-omit-frame-pointer
cflags += ${ASAN_FLAGS} -DMEM_DEBUG
cflags += ${cflags_includes} ${cflags_gnu} -DKILO_SUPPORTED
cflags += -DCJIT_BUILD_LINUX
ldflags := -fsanitize=address -static-libasan
# tinycc_config += --extra-ldflags="${ldflags}"
ldflags := ${ASAN_FLAGS} -static-libasan
endif

ifdef GDB
Expand Down

0 comments on commit e5d46fd

Please sign in to comment.