diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-18 22:26:42 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-18 22:26:42 -0700 |
commit | b31aaa21d5aa0e25091ee51d5bfff561ec929561 (patch) | |
tree | 5b0518824fc5a83ac4d543cf61ba06fe19f924be /makefile | |
parent | c8dd393cf175f9c56de9bf656dab3255095d8bbe (diff) | |
download | mu-b31aaa21d5aa0e25091ee51d5bfff561ec929561.tar.gz |
1404 - undefined-behavior checks using clang
While I'm at it I also explored turning on optimization. With optimization compile+test of the chessboard app takes 10+3s, while without optimization it takes 3+8s. So we're still better off without optimizations in a tight debug loop. (Since we stopped tracing the big chessboard test.)
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/makefile b/makefile index e6f30d40..4f9f0f84 100644 --- a/makefile +++ b/makefile @@ -16,14 +16,17 @@ tangle/tangle: termbox/libtermbox.a: cd termbox && make -.PHONY: autogenerated_lists test valgrind clena +.PHONY: autogenerated_lists test valgrind clang clena test: mu ./mu test -valgrind: mu +valgrind: clang valgrind --leak-check=yes -q --error-exitcode=1 ./mu test +clang: makefile mu.cc termbox/libtermbox.a autogenerated_lists + clang++ -fsanitize=undefined mu.cc termbox/libtermbox.a -o mu + # auto-generated files; by convention they end in '_list'. autogenerated_lists: mu.cc function_list test_list |