shithub: orca

Download patch

ref: b3f6f3d2bb802682742fb94d365c78ca3ddf5175
parent: 7bbdeddf1ccd100126dd0baffe905408cc50a906
author: cancel <cancel@cancel.fm>
date: Sat Nov 24 21:52:36 EST 2018

Add sanitizer flags to debug build

--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 basic_flags := -std=c99 -pipe -Wall -Wpedantic -Wextra -Werror=implicit-function-declaration
 debug_flags := -DDEBUG -O0 -ggdb -feliminate-unused-debug-symbols
+sanitize_flags := -fsanitize=address -fsanitize=leak -fsanitize=undefined
 release_flags := -DNDEBUG -O2 -s -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie -Wl,-pie
 library_flags := -lncurses
 source_files := main.c
@@ -14,7 +15,7 @@
 
 .PHONY: debug
 debug: | build/debug
-	cc $(basic_flags) $(debug_flags) $(source_files) -o build/debug/acro $(library_flags)
+	cc $(basic_flags) $(debug_flags) $(sanitize_flags) $(source_files) -o build/debug/acro $(library_flags)
 
 .PHONY: release
 release: | build/release