summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-07-29 02:05:12 -0400
committerOri Bernstein <ori@eigenstate.org>2016-07-29 02:05:12 -0400
commitce56b7eacc56b427ba673829b0b35b933e3f2cda (patch)
tree3de01183a7e43404721641e3b43eb372f1acba46 /mk
parent359f5e7e727145aeebae62563afbbe031257ea21 (diff)
downloadmc-ce56b7eacc56b427ba673829b0b35b933e3f2cda.tar.gz
Fix a bit of undefined behavior.
Diffstat (limited to 'mk')
-rw-r--r--mk/c.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/mk/c.mk b/mk/c.mk
index d5eead4..405b707 100644
--- a/mk/c.mk
+++ b/mk/c.mk
@@ -9,8 +9,9 @@ _LIBINCPATHS=$(addprefix -I, $(dir $(DEPS))) $(_PCHDRS)
_LIBPATHS=$(addprefix -l, $(patsubst lib%.a,%,$(notdir $(DEPS)))) $(_PCLIBS)
# yeah, I should probably remove -Werror, but it's nice for developing alone.
-CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -g -O0
+CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -g -O0 -fsanitize=undefined
CFLAGS += -MMD -MP -MF .deps/$(subst /,-,$*).d
+LDFLAGS += -fsanitize=undefined
LIB ?= $(INSTLIB)
BIN ?= $(INSTBIN)