diff options
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 |