summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 4b69315..92c94e3 100755
--- a/build.sh
+++ b/build.sh
@@ -21,7 +21,13 @@ else
WARNINGS=''
fi
-DEBUG_FLAGS="-O0 -g3 $WARNINGS -std=c11 -DTOC_DEBUG -DCOMPILE_TIME_FOREIGN_FN_SUPPORT=1 -lffcall -ldl"
+if [ "$1" = "" ]; then
+ if [ "$COMPILE_TIME_FOREIGN_FN_SUPPORT" != "no" ]; then
+ ADDITIONAL_FLAGS="$ADDITIONAL_FLAGS -DCOMPILE_TIME_FOREIGN_FN_SUPPORT=1 -lffcall -ldl"
+ fi
+fi
+
+DEBUG_FLAGS="-O0 -g3 $WARNINGS -std=c11 -DTOC_DEBUG"
RELEASE_FLAGS="-O3 -s -DNDEBUG $WARNINGS -std=c11"
if [ "$1" = "release" ]; then