mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
9c7c924e3c
This runs in the same build as asan, so "asan" now stands for both asan and ubsan.
33 lines
869 B
Bash
Executable File
33 lines
869 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
CACHEDIR="$HOME/cache"
|
|
|
|
. ".travis/flags-$CC.sh"
|
|
add_flag -Werror
|
|
add_flag -fdiagnostics-color=always
|
|
add_flag -fsanitize=address,undefined
|
|
cmake -B_build -H. -GNinja \
|
|
-DCMAKE_C_FLAGS="$C_FLAGS" \
|
|
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
|
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
|
-DCMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \
|
|
-DCMAKE_INSTALL_PREFIX:PATH="$PWD/_install" \
|
|
-DTRACE=ON \
|
|
-DMUST_BUILD_TOXAV=ON \
|
|
-DSTRICT_ABI=ON \
|
|
-DTEST_TIMEOUT_SECONDS=120 \
|
|
-DUSE_IPV6=OFF
|
|
|
|
cd _build
|
|
|
|
ninja install -j$(nproc)
|
|
|
|
export ASAN_OPTIONS="detect_invalid_pointer_pairs=1"
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS,detect_stack_use_after_return=1"
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS,strict_init_order=1"
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS,strict_string_checks=1"
|
|
ctest -j50 --output-on-failure ||
|
|
ctest -j50 --output-on-failure --rerun-failed
|