diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-02-28 00:02:41 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | cff67f93caeb3f98261860904dd232f6b551299e (patch) | |
tree | 94715ee98cc0ea62ea60da96b8b2d3a595b5276e /build.sh | |
parent | 0ed62b9337c64a91481afd91f9e5706a36eca7b5 (diff) |
fix crashes
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -10,8 +10,15 @@ if [ -z "$CC" ]; then CC=cc fi -CFLAGS="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic -fsanitize=address -D_GNU_SOURCE" -LIBS="-pthread -lasan" +CFLAGS="" +LIBS="" +if [ ! -z "$SANITIZE_ADDRESS" ]; then + CFLAGS+="-fsanitize=address " + LIBS+="-lasan " +fi + +CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic -D_GNU_SOURCE" +LIBS+="-pthread" set -x time "$CC" $source_files $CFLAGS $LIBS -o amalgam |