1
0

build_g_threads.sh 421 B

12345678910111213141516171819
  1. set -e
  2. # python prebuild.py
  3. SRC=$(find src/ -name "*.c")
  4. FLAGS="-std=c11 -lm -ldl -lpthread -Iinclude -O0 -Wfatal-errors -g -DDEBUG -DPK_ENABLE_OS=1"
  5. SANITIZE_FLAGS="-fsanitize=undefined,thread -fno-sanitize=function"
  6. if [ "$(uname)" == "Darwin" ]; then
  7. SANITIZE_FLAGS="-fsanitize=undefined,thread"
  8. fi
  9. SRC2=${1:-src2/test_threads.c}
  10. echo "Compiling C files..."
  11. clang $FLAGS $SANITIZE_FLAGS $SRC $SRC2 -o main