[PATCH] D43106: [RISCV] Enable -fforce-enable-int128 through cmake flag COMPILER_RT_HAS_FINT128_FLAG
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 00:03:42 PST 2018
kito-cheng added a comment.
Hi all:
I propose it should check in the `foreach (arch ${BUILTIN_SUPPORTED_ARCH})`, because COMPILER_RT_DEFAULT_TARGET_ARCH is not always set (I only set COMPILER_RT_DEFAULT_TARGET_TRIPLE instead of COMPILER_RT_DEFAULT_TARGET_ARCH in my build).
And that place seems more like right place to put target specific compilation flags.
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index 991108b..364a4f6 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -546,6 +546,12 @@ else ()
list(APPEND BUILTIN_CFLAGS -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
endif()
+ # For RISC-V 32 bits, 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}
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D43106
More information about the llvm-commits
mailing list