summaryrefslogtreecommitdiff
blob: 297620bc775a3e3f4b33b4df08884c48de81ad86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
https://llvm.org/bugs/show_bug.cgi?id=26651
https://github.com/llvm-mirror/compiler-rt/commit/6606c7b50cbb4ec7eab4ecbebbbaaa049734bbd3

diff --git a/projects/compiler-rt/lib/tsan/CMakeLists.txt b/projects/compiler-rt/lib/tsan/CMakeLists.txt
index c185cfa..a151c6c 100644
--- a/projects/compiler-rt/lib/tsan/CMakeLists.txt
+++ b/projects/compiler-rt/lib/tsan/CMakeLists.txt
@@ -192,7 +192,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*)