diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-01-12 16:35:45 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-01-12 16:35:45 +0100 |
commit | 80e83ad35c11919e9f9737d72c04d30c60fd78d3 (patch) | |
tree | 9dc9db83539487f4ef1740fd66f970dbff258a91 | |
parent | fdf921c0adff5317e426e798f8a716ca97046383 (diff) | |
download | kit-80e83ad35c11919e9f9737d72c04d30c60fd78d3.zip |
Clang build scripts
-rw-r--r-- | build_and_test.sh | 10 |
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 |