[compiler-rt] r223908 - [CMake] Make sure dd is built as a part of compiler-rt.

Alexey Samsonov vonosmas at gmail.com
Tue Dec 9 18:14:15 PST 2014


Author: samsonov
Date: Tue Dec  9 20:14:15 2014
New Revision: 223908

URL: http://llvm.org/viewvc/llvm-project?rev=223908&view=rev
Log:
[CMake] Make sure dd is built as a part of compiler-rt.

Remove unused variables and definitions in CMake files
for TSan and DD (deadlock detector).

Modified:
    compiler-rt/trunk/lib/tsan/CMakeLists.txt
    compiler-rt/trunk/lib/tsan/dd/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=223908&r1=223907&r2=223908&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Tue Dec  9 20:14:15 2014
@@ -13,12 +13,6 @@ append_list_if(COMPILER_RT_HAS_WFRAME_LA
 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors TSAN_RTL_CFLAGS)
 # FIXME: Add support for --sysroot=. compile flag:
 
-if("${CMAKE_BUILD_TYPE}" EQUAL "Release")
-  set(TSAN_COMMON_DEFINITIONS DEBUG=0)
-else()
-  set(TSAN_COMMON_DEFINITIONS DEBUG=1)
-endif()
-
 set(TSAN_SOURCES
   rtl/tsan_clock.cc
   rtl/tsan_flags.cc

Modified: compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt?rev=223908&r1=223907&r2=223908&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt Tue Dec  9 20:14:15 2014
@@ -5,23 +5,11 @@ include_directories(../..)
 set(DD_CFLAGS ${SANITIZER_COMMON_CFLAGS})
 append_no_rtti_flag(DD_CFLAGS)
 
-if("${CMAKE_BUILD_TYPE}" EQUAL "Release")
-  set(DD_COMMON_DEFINITIONS DEBUG=0)
-else()
-  set(DD_COMMON_DEFINITIONS DEBUG=1)
-endif()
-
-set(DD_DYNAMIC_DEFINITIONS DYNAMIC=1)
-
 set(DD_SOURCES
   dd_rtl.cc
   dd_interceptors.cc
 )
 
-set(DD_HEADERS
-  dd_rtl.h
-)
-
 set(DD_LINKLIBS)
 append_list_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS)
 append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread DD_LINKLIBS)
@@ -35,12 +23,11 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT AP
             $<TARGET_OBJECTS:RTInterception.${arch}>
             $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
             $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
-    CFLAGS ${DD_CFLAGS}
-    DEFS ${DD_COMMON_DEFINITIONS})
+    CFLAGS ${DD_CFLAGS})
+  add_dependencies(dd clang_rt.dd-${arch})
 
   add_compiler_rt_object_library(RTDD ${arch}
-    SOURCES ${DD_SOURCES} CFLAGS ${DD_CFLAGS}
-    DEFS ${DD_COMMON_DEFINITIONS} ${DD_DYNAMIC_DEFINITIONS})
+    SOURCES ${DD_SOURCES} CFLAGS ${DD_CFLAGS})
 
   add_compiler_rt_runtime(clang_rt.dyndd-${arch} ${arch} SHARED
     SOURCES $<TARGET_OBJECTS:RTDD.${arch}>
@@ -48,7 +35,7 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT AP
             $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
             $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>)
   target_link_libraries(clang_rt.dyndd-${arch} ${DD_LINKLIBS})
+  add_dependencies(dd clang_rt.dyndd-${arch})
 endif()
 
 add_dependencies(compiler-rt dd)
-





More information about the llvm-commits mailing list