From 2f79cb90b11749618c7fc078e9e27654bfc8c31f Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 18 Feb 2016 17:35:30 +0000 Subject: [PATCH] [tsan] Disable sysroot flag on FreeBSD FreeBSD does not install a number of Clang-provided headers for the compiler in the base system due to incompatibilities between FreeBSD's and Clang's versions. As a workaround do not use --sysroot=. on FreeBSD until this is addressed. llvm.org/pr26651 Differential Revision: http://reviews.llvm.org/D17383 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261229 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/tsan/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt index 89da78fb0..f72e54299 100644 --- a/lib/tsan/CMakeLists.txt +++ b/lib/tsan/CMakeLists.txt @@ -193,7 +193,11 @@ endif() add_dependencies(compiler-rt tsan) # Make sure that non-platform-specific files don't include any system headers. -if(COMPILER_RT_HAS_SYSROOT_FLAG) +# FreeBSD does not install a number of Clang-provided headers for the compiler +# in the base system due to incompatibilities between FreeBSD's and Clang's +# versions. As a workaround do not use --sysroot=. on FreeBSD until this is +# addressed. +if(COMPILER_RT_HAS_SYSROOT_FLAG AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD") file(GLOB _tsan_generic_sources rtl/tsan*) file(GLOB _tsan_platform_sources rtl/tsan*posix* rtl/tsan*mac* rtl/tsan*linux*)