summaryrefslogtreecommitdiff
path: root/lib/builtins
diff options
context:
space:
mode:
authorAndrey Turetskiy <andrey.turetskiy@gmail.com>2016-02-20 12:56:04 +0000
committerAndrey Turetskiy <andrey.turetskiy@gmail.com>2016-02-20 12:56:04 +0000
commitd0450782ef558da661bb7ecf7f6990e7f6a7f480 (patch)
tree60db7509c43ad91b6ba5e151b65f2a095c72b753 /lib/builtins
parent907eb66f08e75ab673775e53f184cb9174619668 (diff)
[CMake] Add partial support for MSVC in compiler-rt builtins, by Roman Shirokiy.
This enables MSVC build of complex number arithmetic compiler-rt builtins. Differential Revision: http://reviews.llvm.org/D17452 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins')
-rw-r--r--lib/builtins/CMakeLists.txt18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index a04d96b4e..4d6043088 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -143,6 +143,15 @@ set(GENERIC_SOURCES
umodsi3.c
umodti3.c)
+set(MSVC_SOURCES
+ divsc3.c
+ divdc3.c
+ divxc3.c
+ mulsc3.c
+ muldc3.c
+ mulxc3.c)
+
+
if(APPLE)
set(GENERIC_SOURCES
${GENERIC_SOURCES}
@@ -216,14 +225,15 @@ if (NOT MSVC)
${i386_SOURCES})
else () # MSVC
# Use C versions of functions when building on MSVC
- # MSVC's assembler takes Intel syntax, not AT&T syntax
+ # MSVC's assembler takes Intel syntax, not AT&T syntax.
+ # Also use only MSVC compilable builtin implementations.
set(x86_64_SOURCES
x86_64/floatdidf.c
x86_64/floatdisf.c
x86_64/floatdixf.c
- ${GENERIC_SOURCES})
+ ${MSVC_SOURCES})
set(x86_64h_SOURCES ${x86_64_SOURCES})
- set(i386_SOURCES ${GENERIC_SOURCES})
+ set(i386_SOURCES ${MSVC_SOURCES})
set(i686_SOURCES ${i386_SOURCES})
endif () # if (NOT MSVC)
@@ -363,7 +373,7 @@ if (APPLE)
add_subdirectory(Darwin-excludes)
add_subdirectory(macho_embedded)
darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS})
-elseif (NOT WIN32 OR MINGW)
+else ()
append_string_if(COMPILER_RT_HAS_STD_C99_FLAG -std=c99 maybe_stdc99)
foreach (arch ${BUILTIN_SUPPORTED_ARCH})