Skip to content

Commit

Permalink
Update build_test_cpp.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Sep 29, 2024
1 parent 34a30d9 commit 4d8b9e4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions build_tools/build_test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ CMAKE_ARGS="\
san="${san:-}"

if [ "$san" != "" ];then
sed -i 's/add_subdirectory(tests EXCLUDE_FROM_ALL)//g' CMakeLists.txt
CMAKE_ARGS="$CMAKE_ARGS -DIREE_ENABLE_$san=ON"
CMAKE_ARGS="$CMAKE_ARGS -DIREE_ENABLE_$san=ON -DHAVE_STD_REGEX=ON"
export ASAN_OPTIONS=detect_leaks=0
export MSAN_OPTIONS=halt_on_error=0
export TSAN_OPTIONS=halt_on_error=0
export UBSAN_OPTIONS=halt_on_error=0
fi

if [ -d "${llvm_install_dir}" ]; then
Expand Down Expand Up @@ -125,6 +128,13 @@ echo "----------"
echo "Install to: $install_dir"
cmake --build "$build_dir" --target iree-install-dist

if [ "$san" != "" ];then
export ASAN_OPTIONS=detect_leaks=1:verbosity=1:log_threads=1:print_stacktrace=1
export MSAN_OPTIONS=halt_on_error=1:verbosity=1:log_threads=1:print_stacktrace=1
export TSAN_OPTIONS=halt_on_error=1:verbosity=1:log_threads=1:print_stacktrace=1
export UBSAN_OPTIONS=halt_on_error=1:verbosity=1:log_threads=1:print_stacktrace=1
fi

echo "CTest"
echo "-----"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
Expand Down

0 comments on commit 4d8b9e4

Please sign in to comment.