diff options
author | Chris Bieneman <beanz@apple.com> | 2016-08-12 01:29:26 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-08-12 01:29:26 +0000 |
commit | 8a22938e76396fcbe2fc174686322e6e2e874ad4 (patch) | |
tree | 02f65dad91da26b3cf9bf8cb62519289036c5032 /lib/builtins/CMakeLists.txt | |
parent | a521e597b28e48210f08331f8368923d4f5c4203 (diff) |
[CMake] If the compiler supports _Atomic include atomic.c in builtins libraries
This fixes a long-standing TODO by implementing a compiler check for supporting the _Atomic keyword. If the _Atomic keyword is supported by the compiler we should include it in the builtin library sources.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/CMakeLists.txt')
-rw-r--r-- | lib/builtins/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt index beacb8676..fc973a78c 100644 --- a/lib/builtins/CMakeLists.txt +++ b/lib/builtins/CMakeLists.txt @@ -42,8 +42,6 @@ set(GENERIC_SOURCES ashlti3.c ashrdi3.c ashrti3.c - # FIXME: atomic.c may only be compiled if host compiler understands _Atomic - # atomic.c clear_cache.c clzdi2.c clzsi2.c @@ -166,6 +164,12 @@ set(GENERIC_SOURCES umodsi3.c umodti3.c) +if(COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD) + set(GENERIC_SOURCES + ${GENERIC_SOURCES} + atomic.c) +endif() + set(MSVC_SOURCES divsc3.c divdc3.c |