2019-05-14 16:20:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-11-10 11:55:19 +02:00
|
|
|
cwd="$(readlink -f $(dirname $0))"
|
2019-05-14 16:20:06 +00:00
|
|
|
|
|
|
|
rm -rf "$cwd/../debug"
|
|
|
|
mkdir -p "$cwd/../debug"
|
|
|
|
cd "$cwd/../debug"
|
|
|
|
|
|
|
|
export CC=clang CXX=clang++
|
2020-01-20 03:33:03 +00:00
|
|
|
export LSAN_OPTIONS=suppressions="$cwd/../scripts/lsan.supp"
|
2019-05-19 15:04:52 +00:00
|
|
|
# undefined,float-cast-overflow,thread,memory,address
|
|
|
|
sanitizers="address"
|
2019-05-31 12:38:14 +00:00
|
|
|
export CXXFLAGS="$CXXFLAGS -Wall -fsanitize=$sanitizers -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
|
|
|
export LDFLAGS="$LDFLAGS -Wall -fsanitize=$sanitizers"
|
2019-05-14 16:20:06 +00:00
|
|
|
|
|
|
|
cmake ../ -DCMAKE_BUILD_TYPE=Debug \
|
2019-12-29 09:51:38 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr $@
|
2020-11-25 23:12:43 +00:00
|
|
|
make -j $(nproc || sysctl -n hw.ncpu || echo 1)
|