summaryrefslogtreecommitdiff
path: root/build_and_test.sh
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-01-12 16:35:45 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-01-12 16:35:45 +0100
commit80e83ad35c11919e9f9737d72c04d30c60fd78d3 (patch)
tree9dc9db83539487f4ef1740fd66f970dbff258a91 /build_and_test.sh
parentfdf921c0adff5317e426e798f8a716ca97046383 (diff)
downloadkit-80e83ad35c11919e9f9737d72c04d30c60fd78d3.zip
Clang build scripts
Diffstat (limited to 'build_and_test.sh')
-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