build: Disable gcov on TSAN builds

It seems GCOV does not play well with TSAN as it reports false data races
This commit is contained in:
Thiago de Arruda 2015-08-29 09:19:54 -03:00
parent 7eaeed112e
commit 9ec240e03f
2 changed files with 4 additions and 1 deletions

View File

@ -79,7 +79,7 @@ matrix:
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=MSAN
- os: linux
compiler: clang-3.6
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=TSAN
env: CLANG_SANITIZER=TSAN
- os: osx
compiler: clang
env: GCOV=gcov

View File

@ -2,12 +2,15 @@ include(CheckLibraryExists)
option(USE_GCOV "Enable gcov support" OFF)
if(NOT CLANG_TSAN)
# GCOV and TSAN results in false data race reports
if(USE_GCOV)
message(STATUS "Enabling gcov support")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
endif()
endif()
set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/nvim/auto)
set(DISPATCH_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/msgpack-gen.lua)