diff options
author | Martin Storsjo <martin@martin.st> | 2016-11-19 21:22:38 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2016-11-19 21:22:38 +0000 |
commit | 8134888c4d01164a92fb590c8d2e8c277a55e233 (patch) | |
tree | b132fd9999515b3b642bee07962fb84a9d57c466 /lib/builtins/CMakeLists.txt | |
parent | ed845eb8a5232110728ef99f51958b759d7e0f1c (diff) |
builtins: Allow building windows arm functions for mingw
When building with clang/LLVM in MSVC mode, the msvcrt libraries contain
these functions.
When building in a mingw environment, we need to provide them somehow,
e.g. via compiler-rt.
The aeabi divmod functions work in the same way as the corresponding
__rt_*div* functions for windows, but their parameters are swapped.
The functions for converting float to integer and vice versa are the
same as their aeabi equivalents, only with different function names.
Differential Revision: https://reviews.llvm.org/D26183
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/CMakeLists.txt')
-rw-r--r-- | lib/builtins/CMakeLists.txt | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt index 5cbc1cb28..64d5ca3d4 100644 --- a/lib/builtins/CMakeLists.txt +++ b/lib/builtins/CMakeLists.txt @@ -371,7 +371,31 @@ set(arm_Thumb1_SOURCES ${arm_Thumb1_VFPv2_SOURCES} ${arm_Thumb1_icache_SOURCES}) -if(NOT WIN32) +if(MINGW) + set(arm_SOURCES + arm/aeabi_idivmod.S + arm/aeabi_ldivmod.S + arm/aeabi_uidivmod.S + arm/aeabi_uldivmod.S + divmoddi4.c + divmodsi4.c + divdi3.c + divsi3.c + fixdfdi.c + fixsfdi.c + fixunsdfdi.c + fixunssfdi.c + floatdidf.c + floatdisf.c + floatundidf.c + floatundisf.c + mingw_fixfloat.c + moddi3.c + udivmoddi4.c + udivmodsi4.c + udivsi3.c + umoddi3.c) +else(MINGW) # TODO the EABI sources should only be added to EABI targets set(arm_SOURCES ${arm_SOURCES} |