[flang-commits] [flang] [flang] Add flag to disable Float128 runtime (PR #110116)

David Truby via flang-commits flang-commits at lists.llvm.org
Thu Sep 26 23:20:50 PDT 2024


================
@@ -103,7 +103,13 @@ append(${NO_LTO_FLAGS} CMAKE_CXX_FLAGS)
 add_definitions(-U_GLIBCXX_ASSERTIONS)
 add_definitions(-U_LIBCPP_ENABLE_ASSERTIONS)
 
-add_subdirectory(Float128Math)
+set(FLANG_RUNTIME_ENABLE_F128 On CACHE BOOL
----------------
DavidTruby wrote:

As I understand it, we currently check if the libc has float 128 support by checking if `LDBL_MANT_DIG` has a certain value. The issue I guess is that that's sufficient for checking that libc will provide float 128 support for the _standard_ libc functions, but `ynl` is a glibc-only function. 

I think it'd be nice if we could have this support everywhere that does have float128 not just glibc; could we maybe re-use the implementation from llvm/libc++ somehow without introducing a runtime dependency on the system c++ library? And possibly the same for any other glibc-specific functions that might be being used (I haven't checked for others)? 

https://github.com/llvm/llvm-project/pull/110116


More information about the flang-commits mailing list