[compiler-rt] r189579 - [TSan] Move build rules a bit to ensure correct dependencies of check-tsan command

Alexey Samsonov samsonov at google.com
Thu Aug 29 04:53:11 PDT 2013


Author: samsonov
Date: Thu Aug 29 06:53:11 2013
New Revision: 189579

URL: http://llvm.org/viewvc/llvm-project?rev=189579&view=rev
Log:
[TSan] Move build rules a bit to ensure correct dependencies of check-tsan command

Removed:
    compiler-rt/trunk/lib/tsan/rtl/CMakeLists.txt
Modified:
    compiler-rt/trunk/lib/tsan/CMakeLists.txt

Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=189579&r1=189578&r2=189579&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Thu Aug 29 06:53:11 2013
@@ -19,7 +19,57 @@ else()
   set(TSAN_COMMON_DEFINITIONS DEBUG=1)
 endif()
 
-add_subdirectory(rtl)
+set(TSAN_SOURCES
+  rtl/tsan_clock.cc
+  rtl/tsan_flags.cc
+  rtl/tsan_fd.cc
+  rtl/tsan_interceptors.cc
+  rtl/tsan_interface_ann.cc
+  rtl/tsan_interface_atomic.cc
+  rtl/tsan_interface.cc
+  rtl/tsan_interface_java.cc
+  rtl/tsan_md5.cc
+  rtl/tsan_mman.cc
+  rtl/tsan_mutex.cc
+  rtl/tsan_mutexset.cc
+  rtl/tsan_report.cc
+  rtl/tsan_rtl.cc
+  rtl/tsan_rtl_mutex.cc
+  rtl/tsan_rtl_report.cc
+  rtl/tsan_rtl_thread.cc
+  rtl/tsan_stat.cc
+  rtl/tsan_suppressions.cc
+  rtl/tsan_symbolize.cc
+  rtl/tsan_sync.cc)
+
+if(APPLE)
+  list(APPEND TSAN_SOURCES rtl/tsan_platform_mac.cc)
+elseif(UNIX)
+  # Assume Linux
+  list(APPEND TSAN_SOURCES
+    rtl/tsan_platform_linux.cc
+    rtl/tsan_symbolize_addr2line_linux.cc)
+endif()
+
+set(TSAN_RUNTIME_LIBRARIES)
+# TSan is currently supported on 64-bit Linux only.
+if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE)
+  set(TSAN_ASM_SOURCES rtl/tsan_rtl_amd64.S)
+  # Pass ASM file directly to the C++ compiler.
+  set_source_files_properties(${TSAN_ASM_SOURCES} PROPERTIES
+    LANGUAGE C)
+  set(arch "x86_64")
+  add_compiler_rt_static_runtime(clang_rt.tsan-${arch} ${arch}
+    SOURCES ${TSAN_SOURCES} ${TSAN_ASM_SOURCES}
+            $<TARGET_OBJECTS:RTInterception.${arch}>
+            $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
+            $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
+    CFLAGS ${TSAN_CFLAGS}
+    DEFS ${TSAN_COMMON_DEFINITIONS})
+  add_sanitizer_rt_symbols(clang_rt.tsan-${arch} rtl/tsan.syms.extra)
+  list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch}
+    clang_rt.tsan-${arch}-symbols)
+endif()
 
 if(LLVM_INCLUDE_TESTS)
   add_subdirectory(tests)

Removed: compiler-rt/trunk/lib/tsan/rtl/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/CMakeLists.txt?rev=189578&view=auto
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/rtl/CMakeLists.txt (removed)
@@ -1,52 +0,0 @@
-set(TSAN_SOURCES
-  tsan_clock.cc
-  tsan_flags.cc
-  tsan_fd.cc
-  tsan_interceptors.cc
-  tsan_interface_ann.cc
-  tsan_interface_atomic.cc
-  tsan_interface.cc
-  tsan_interface_java.cc
-  tsan_md5.cc
-  tsan_mman.cc
-  tsan_mutex.cc
-  tsan_mutexset.cc
-  tsan_report.cc
-  tsan_rtl.cc
-  tsan_rtl_mutex.cc
-  tsan_rtl_report.cc
-  tsan_rtl_thread.cc
-  tsan_stat.cc
-  tsan_suppressions.cc
-  tsan_symbolize.cc
-  tsan_sync.cc
-  )
-
-if(APPLE)
-  list(APPEND TSAN_SOURCES tsan_platform_mac.cc)
-elseif(UNIX)
-  # Assume Linux
-  list(APPEND TSAN_SOURCES
-    tsan_platform_linux.cc
-    tsan_symbolize_addr2line_linux.cc)
-endif()
-
-set(TSAN_RUNTIME_LIBRARIES)
-# TSan is currently supported on 64-bit Linux only.
-if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE)
-  set(TSAN_ASM_SOURCES tsan_rtl_amd64.S)
-  # Pass ASM file directly to the C++ compiler.
-  set_source_files_properties(${TSAN_ASM_SOURCES} PROPERTIES
-    LANGUAGE C)
-  set(arch "x86_64")
-  add_compiler_rt_static_runtime(clang_rt.tsan-${arch} ${arch}
-    SOURCES ${TSAN_SOURCES} ${TSAN_ASM_SOURCES}
-            $<TARGET_OBJECTS:RTInterception.${arch}>
-            $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
-            $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
-    CFLAGS ${TSAN_CFLAGS}
-    DEFS ${TSAN_COMMON_DEFINITIONS})
-  add_sanitizer_rt_symbols(clang_rt.tsan-${arch} tsan.syms.extra)
-  list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch}
-    clang_rt.tsan-${arch}-symbols)
-endif()





More information about the llvm-commits mailing list