summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_and_test.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/build_and_test.sh b/build_and_test.sh
index b3a3f2d..019e05c 100644
--- a/build_and_test.sh
+++ b/build_and_test.sh
@@ -114,7 +114,7 @@ if [ "$COMPILE" != "emcc" ]; then
esac
fi
-if [ "$COMPILE" = "gcc" ] || [ "$COMPILE" = "clang" ] || [ "$COMPILE" = "emcc" ]; then
+if [ "$COMPILE" = "gcc" ] || [ "$COMPILE" = "emcc" ]; then
if [ "$1" = "release" ]; then
FLAGS="-O3 -DNDEBUG"
elif [ "$COMPILE" = "gcc" ] && [ "$OS" != "Windows" ]; then
@@ -124,6 +124,12 @@ if [ "$COMPILE" = "gcc" ] || [ "$COMPILE" = "clang" ] || [ "$COMPILE" = "emcc" ]
else
FLAGS="-O0"
fi
+elif [ "$COMPILE" = "clang" ]; then
+ if [ "$1" = "release" ]; then
+ FLAGS="-O3 -DNDEBUG"
+ else
+ FLAGS="-O0"
+ fi
else
if [ "$1" = "release" ]; then
FLAGS="-O2 -DNDEBUG"
@@ -134,6 +140,8 @@ fi
if [ "$COMPILE" = "clang" ] || [ "$OS" = "macOS" ]; then
FLAGS="-fblocks ${FLAGS}"
+ LINK_FLAGS="-lBlocksRuntime ${LINK_FLAGS}"
+ COMPILEPP="${COMPILEPP} -stdlib=libc++"
fi
if [ ! -d "$FOLDER" ]; then