|
@ -176,23 +176,20 @@ build_target() { |
|
|
build_subdir=debug |
|
|
build_subdir=debug |
|
|
add cc_flags -DDEBUG -ggdb -fsanitize=address -fsanitize=undefined |
|
|
add cc_flags -DDEBUG -ggdb -fsanitize=address -fsanitize=undefined |
|
|
if [[ $os = mac ]]; then |
|
|
if [[ $os = mac ]]; then |
|
|
# mac clang does not have -Og |
|
|
# Our mac clang does not have -Og |
|
|
add cc_flags -O1 |
|
|
add cc_flags -O1 |
|
|
# tui in the future |
|
|
|
|
|
# add libraries -lncurses |
|
|
|
|
|
else |
|
|
else |
|
|
add cc_flags -Og |
|
|
add cc_flags -Og |
|
|
# needed if address is already specified? doesn't work on mac clang, at |
|
|
# needed if address is already specified? doesn't work on mac clang, at |
|
|
# least |
|
|
# least |
|
|
# add cc_flags -fsanitize=leak |
|
|
# add cc_flags -fsanitize=leak |
|
|
# add libraries -lncursesw |
|
|
|
|
|
fi |
|
|
fi |
|
|
;; |
|
|
;; |
|
|
release) |
|
|
release) |
|
|
build_subdir=release |
|
|
build_subdir=release |
|
|
add cc_flags -DNDEBUG -O2 -g0 |
|
|
add cc_flags -DNDEBUG -O2 -g0 |
|
|
if [[ $protections_enabled != 1 ]]; then |
|
|
if [[ $protections_enabled != 1 ]]; then |
|
|
add cc_flags -D_FORTIFY_SOURCE=0 -fno-stack-protector |
|
|
add cc_flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-stack-protector |
|
|
fi |
|
|
fi |
|
|
if [[ $os = mac ]]; then |
|
|
if [[ $os = mac ]]; then |
|
|
# todo some stripping option |
|
|
# todo some stripping option |
|
|