Skip to content
Permalink
Browse files

Disable sanitizers on Travis due to old binutils

  • Loading branch information...
PJK committed Jan 27, 2019
1 parent 38106ab commit 0fcd23a8c5e7465fbde1e73f429e7ce7252a4c05
Showing with 2 additions and 6 deletions.
  1. +1 −0 .travis-qemu.sh
  2. +1 −6 CMakeLists.txt
@@ -116,6 +116,7 @@ else
cmake \
-DCBOR_CUSTOM_ALLOC=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DSANITIZE=OFF \
-DWITH_TESTS=ON \
-DCMAKE_PREFIX_PATH=${HOME}/usr/local \
.
@@ -76,12 +76,7 @@ else()
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -flto -Wall -pedantic -DNDEBUG")

if(SANITIZE)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -fsanitize=bounds -fsanitize=alignment")
# fsanitize=undefined causes the linker to fail on certain GCC toolchains
# https://stackoverflow.com/questions/50024731/ld-unrecognized-option-push-state-no-as-needed
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=undefined")
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=undefined -fsanitize=address -fsanitize=bounds -fsanitize=alignment")
endif()
endif()

0 comments on commit 0fcd23a

Please sign in to comment.
You can’t perform that action at this time.