Skip to content

Commit 6dbb531

Browse files
authored
[flang-rt] Set HAVE_LDBL_MANT_DIG_113. (#130836)
This check enables flang_rt.quadmath build on aarch64.
1 parent 0e4ba47 commit 6dbb531

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

flang-rt/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ check_cxx_source_compiles(
223223
"
224224
HAVE_DECL_STRERROR_S)
225225

226-
227226
# Search for clang_rt.builtins library. Need in addition to msvcrt.
228227
if (WIN32)
229228
find_compiler_rt_library(builtins FLANG_RT_BUILTINS_LIBRARY)
@@ -294,6 +293,15 @@ elseif (FLANG_RT_GCC_RESOURCE_DIR)
294293
endif ()
295294
endif ()
296295

296+
# Check if 128-bit float computations can be done via long double.
297+
check_cxx_source_compiles(
298+
"#include <cfloat>
299+
#if LDBL_MANT_DIG != 113
300+
#error LDBL_MANT_DIG != 113
301+
#endif
302+
int main() { return 0; }
303+
"
304+
HAVE_LDBL_MANT_DIG_113)
297305

298306

299307
#####################

0 commit comments

Comments
 (0)