[llvm-commits] [compiler-rt] r82627 - /compiler-rt/trunk/CMakeLists.txt

Shantonu Sen ssen at apple.com
Wed Sep 23 11:05:25 CDT 2009


Author: ssen
Date: Wed Sep 23 11:05:25 2009
New Revision: 82627

URL: http://llvm.org/viewvc/llvm-project?rev=82627&view=rev
Log:
If the compiler does not support GCC-compatible
atomic operations, skip building the blocks runtime

Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=82627&r1=82626&r2=82627&view=diff

==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Sep 23 11:05:25 2009
@@ -34,9 +34,19 @@
  Debug Release Profile
  )
 
-# BlocksRuntime - some random cruft that got thrown in at the last minute, ignoring for now.
-ADD_SUBDIRECTORY( BlocksRuntime )
+# Only build Blocks Runtime if the compiler has enough support
+IF( WIN32 OR MSVC OR HAVE_OSATOMIC_COMPARE_AND_SWAP_INT OR HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT )
+  SET(BUILD_BLOCKS_RUNTIME TRUE)
+ELSE( WIN32 OR MSVC OR HAVE_OSATOMIC_COMPARE_AND_SWAP_INT OR HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT )
+  SET(BUILD_BLOCKS_RUNTIME FALSE)
+ENDIF( WIN32 OR MSVC OR HAVE_OSATOMIC_COMPARE_AND_SWAP_INT OR HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT )
 
+IF( BUILD_BLOCKS_RUNTIME )
+  ADD_SUBDIRECTORY( BlocksRuntime )
+ELSE( BUILD_BLOCKS_RUNTIME )
+  MESSAGE(STATUS "No suitable atomic operation routines detected, skipping Blocks Runtime")
+ENDIF( BUILD_BLOCKS_RUNTIME )
+ 
 ADD_SUBDIRECTORY( lib )
 
 # Tests are being ignored for until the very basics are working.





More information about the llvm-commits mailing list