[PATCH] D68176: tsan: Remove --sysroot=. from tsan

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 19:21:23 PDT 2019


vitalybuka created this revision.
vitalybuka added reviewers: eugenis, dvyukov.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.

This flag makes changing includes in sanitizer_common very inconvenient.
Original commit didn't explain why that was needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68176

Files:
  compiler-rt/lib/tsan/CMakeLists.txt


Index: compiler-rt/lib/tsan/CMakeLists.txt
===================================================================
--- compiler-rt/lib/tsan/CMakeLists.txt
+++ compiler-rt/lib/tsan/CMakeLists.txt
@@ -230,21 +230,6 @@
   endforeach()
 endif()
 
-# Make sure that non-platform-specific files don't include any system headers.
-# FreeBSD/NetBSD do not install a number of Clang-provided headers for the
-# compiler in the base system due to incompatibilities between FreeBSD/NetBSD's
-# and Clang's versions. As a workaround do not use --sysroot=. on FreeBSD/NetBSD
-# until this is addressed.
-if(COMPILER_RT_HAS_SYSROOT_FLAG AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
-   AND NOT CMAKE_SYSTEM_NAME MATCHES "NetBSD")
-  file(GLOB _tsan_generic_sources rtl/tsan*)
-  file(GLOB _tsan_platform_sources rtl/tsan*posix* rtl/tsan*mac*
-                                   rtl/tsan*linux*)
-  list(REMOVE_ITEM _tsan_generic_sources ${_tsan_platform_sources})
-  set_source_files_properties(${_tsan_generic_sources}
-    PROPERTIES COMPILE_FLAGS "--sysroot=.")
-endif()
-
 # Build libcxx instrumented with TSan.
 if(COMPILER_RT_LIBCXX_PATH AND
    COMPILER_RT_LIBCXXABI_PATH AND


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68176.222276.patch
Type: text/x-patch
Size: 1164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190928/b5b41582/attachment.bin>


More information about the llvm-commits mailing list