trying to get gcc 5/6 under linux to pass - need to force gold linker for sanitizers because ld is too old
diff --git a/.travis.yml b/.travis.yml
index 49d75c6..87ea4df 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -113,7 +113,7 @@
sources: ubuntu-toolchain-r-test
# GCC 5
- - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
+ - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true SANITIZER_CXX_FLAGS=-fuse-ld=gold
compiler: gcc
addons: &gcc5
apt:
@@ -121,10 +121,7 @@
sources: ubuntu-toolchain-r-test
# GCC 6
- # released on 2016.04.27
- # wait for it to enter the whitelist - https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- # also with homebrew under OSX!!!
- - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
+ - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true SANITIZER_CXX_FLAGS=-fuse-ld=gold
compiler: gcc
addons: &gcc6
apt:
@@ -314,12 +311,6 @@
# - export CXX="ccache ${COMPILER}"
- export CXX="${COMPILER}"
- ${CXX} --version
- - |
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
- export CLINKER=`which gold`
- ${CLINKER} --version
- export CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_LINKER=${CLINKER}"
- fi
# - ccache -s
script:
@@ -364,14 +355,14 @@
# sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
- cmake -DTEST_MODE=COMPARE .
# on separate commands because when something fails I want to see which one exactly
- - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m64 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m64 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m32 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m64 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m64 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
- - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m32 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m64 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m32 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m64 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m32 -fsanitize=address" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m64 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m32 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m64 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
+ - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${SANITIZER_CXX_FLAGS} -m32 -fsanitize=undefined" . && make clean && make -k -j2 && ctest --output-on-failure ; fi
# - ccache -s