aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-18 23:47:45 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit2323ca6c9ec3c8ee76b9acf13745b80b92952a6a (patch)
tree93013237dbcb0fa96ceb5f3c026fd040aff464cf /build.sh
parent5a93c32a59775cd1be4b4f450e8230016b434366 (diff)
Add struct, import caching, binop ops etc
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index ab43d20..240b2e9 100755
--- a/build.sh
+++ b/build.sh
@@ -12,11 +12,18 @@ fi
CFLAGS=""
LIBS=""
+
if [ ! -z "$SANITIZE_ADDRESS" ]; then
CFLAGS+="-fsanitize=address "
+elif [ ! -z "$SANITIZE_THREAD" ]; then
+ CFLAGS+="-fsanitize=thread "
+fi
+
+if [ ! -z "$PEDANTIC" ]; then
+ CFLAGS+="-DAMAL_PEDANTIC -pedantic "
fi
-CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic -D_GNU_SOURCE"
+CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -D_GNU_SOURCE"
LIBS+="-pthread"
BUILD_ARGS="$source_files $CFLAGS $LIBS -shared -fpic -o libamalgam.so"