aboutsummaryrefslogtreecommitdiff
path: root/lib/builtins/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/CMakeLists.txt')
-rw-r--r--lib/builtins/CMakeLists.txt52
1 files changed, 50 insertions, 2 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index 0b50b5bb8d23..75ff66405649 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -173,8 +173,8 @@ set(GENERIC_TF_SOURCES
trunctfsf2.c)
option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN
- "Skip the atomic builtin (this may be needed if system headers are unavailable)"
- Off)
+ "Skip the atomic builtin (these should normally be provided by a shared library)"
+ On)
if(NOT FUCHSIA AND NOT COMPILER_RT_BAREMETAL_BUILD)
set(GENERIC_SOURCES
@@ -406,6 +406,7 @@ if(MINGW)
arm/aeabi_ldivmod.S
arm/aeabi_uidivmod.S
arm/aeabi_uldivmod.S
+ arm/chkstk.S
divmoddi4.c
divmodsi4.c
divdi3.c
@@ -459,6 +460,41 @@ set(armv6m_SOURCES ${thumb1_SOURCES})
set(armv7m_SOURCES ${arm_SOURCES})
set(armv7em_SOURCES ${arm_SOURCES})
+# hexagon arch
+set(hexagon_SOURCES ${GENERIC_SOURCES} ${GENERIC_TF_SOURCES})
+set(hexagon_SOURCES
+ hexagon/common_entry_exit_abi1.S
+ hexagon/common_entry_exit_abi2.S
+ hexagon/common_entry_exit_legacy.S
+ hexagon/dfaddsub.S
+ hexagon/dfdiv.S
+ hexagon/dffma.S
+ hexagon/dfminmax.S
+ hexagon/dfmul.S
+ hexagon/dfsqrt.S
+ hexagon/divdi3.S
+ hexagon/divsi3.S
+ hexagon/fabs_opt.S
+ hexagon/fastmath2_dlib_asm.S
+ hexagon/fastmath2_ldlib_asm.S
+ hexagon/fastmath_dlib_asm.S
+ hexagon/fma_opt.S
+ hexagon/fmax_opt.S
+ hexagon/fmin_opt.S
+ hexagon/memcpy_forward_vp4cp4n2.S
+ hexagon/memcpy_likely_aligned.S
+ hexagon/moddi3.S
+ hexagon/modsi3.S
+ hexagon/sfdiv_opt.S
+ hexagon/sfsqrt_opt.S
+ hexagon/udivdi3.S
+ hexagon/udivmoddi4.S
+ hexagon/udivmodsi4.S
+ hexagon/udivsi3.S
+ hexagon/umoddi3.S
+ hexagon/umodsi3.S)
+
+
set(mips_SOURCES ${GENERIC_SOURCES})
set(mipsel_SOURCES ${mips_SOURCES})
set(mips64_SOURCES ${GENERIC_TF_SOURCES}
@@ -480,6 +516,12 @@ set(powerpc64_SOURCES
${GENERIC_SOURCES})
set(powerpc64le_SOURCES ${powerpc64_SOURCES})
+set(riscv_SOURCES ${GENERIC_SOURCES} ${GENERIC_TF_SOURCES})
+set(riscv32_SOURCES
+ riscv/mulsi3.S
+ ${riscv_SOURCES})
+set(riscv64_SOURCES ${riscv_SOURCES})
+
set(wasm32_SOURCES
${GENERIC_TF_SOURCES}
${GENERIC_SOURCES})
@@ -542,6 +584,12 @@ else ()
list(APPEND BUILTIN_CFLAGS -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
endif()
+ # For RISCV32, we must force enable int128 for compiling long
+ # double routines.
+ if("${arch}" STREQUAL "riscv32")
+ list(APPEND BUILTIN_CFLAGS -fforce-enable-int128)
+ endif()
+
add_compiler_rt_runtime(clang_rt.builtins
STATIC
ARCHS ${arch}