[compiler-rt] r199979 - Don't create check-ubsan and check-dfsan commands if they are not supported on this platform

Alexey Samsonov samsonov at google.com
Fri Jan 24 00:06:21 PST 2014


Author: samsonov
Date: Fri Jan 24 02:06:21 2014
New Revision: 199979

URL: http://llvm.org/viewvc/llvm-project?rev=199979&view=rev
Log:
Don't create check-ubsan and check-dfsan commands if they are not supported on this platform

Modified:
    compiler-rt/trunk/lib/dfsan/CMakeLists.txt
    compiler-rt/trunk/lib/ubsan/CMakeLists.txt

Modified: compiler-rt/trunk/lib/dfsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/CMakeLists.txt?rev=199979&r1=199978&r2=199979&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/dfsan/CMakeLists.txt Fri Jan 24 02:06:21 2014
@@ -10,6 +10,8 @@ set(DFSAN_RTL_CFLAGS
   # Prevent clang from generating libc calls.
   -ffreestanding)
 
+filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64)
+
 # Static runtime library.
 set(DFSAN_RUNTIME_LIBRARIES)
 set(arch "x86_64")
@@ -41,4 +43,6 @@ add_custom_command(OUTPUT ${CLANG_RESOUR
 install(FILES ${CLANG_RESOURCE_DIR}/dfsan_abilist.txt
         DESTINATION ${LIBCLANG_INSTALL_PATH})
 
-add_subdirectory(lit_tests)
+if(DFSAN_SUPPORTED_ARCH)
+  add_subdirectory(lit_tests)
+endif()

Modified: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/CMakeLists.txt?rev=199979&r1=199978&r2=199979&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Fri Jan 24 02:06:21 2014
@@ -53,4 +53,6 @@ else()
   endforeach()
 endif()
 
-add_subdirectory(lit_tests)
+if(UBSAN_SUPPORTED_ARCH)
+  add_subdirectory(lit_tests)
+endif()





More information about the llvm-commits mailing list