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

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu Sep 26 09:14:34 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
----------------
vzakhari wrote:

I guess it is okay as an engineering temporary switch, but, in general, uncoordinated settings for float128 math for the compiler driver and runtime may result in completely unsuable driver, e.g. if Float128Math is packaged as a separate library (rather than as part of FortranRuntime) then the driver will try to link it always, so it has to be built during the runtime build.  As I uderstand this is not your case, and Float128Math is a part of FortranRuntime (except that it does not build at all due to missing `ynl`).

If `ynl` is the only missing piece in those configurations, you can try to ifdef `DEFINE_SIMPLE_ALIAS(Yn, ynl)` in `math-entries.h` for those targets.  The library will compile, but there will be a runtime error if a program uses `bessel_yn` for `real(16)`.

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


More information about the flang-commits mailing list