diff options
author | Shantonu Sen <ssen@apple.com> | 2009-09-23 16:05:25 +0000 |
---|---|---|
committer | Shantonu Sen <ssen@apple.com> | 2009-09-23 16:05:25 +0000 |
commit | ae3b01cf8af01ce58a18d380548d17d0f056c0a5 (patch) | |
tree | 76a9ee9b0cbea1c866d29ce91e08db03e1907a98 | |
parent | 35684d034efcafcce4d7e81aa49bec7f9ac277d6 (diff) | |
download | bcm5719-llvm-ae3b01cf8af01ce58a18d380548d17d0f056c0a5.tar.gz bcm5719-llvm-ae3b01cf8af01ce58a18d380548d17d0f056c0a5.zip |
If the compiler does not support GCC-compatible
atomic operations, skip building the blocks runtime
llvm-svn: 82627
-rw-r--r-- | compiler-rt/CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt index 064fde0afe3..9c458477d7c 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -34,9 +34,19 @@ SET( Configurations 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. |