[libc-commits] [libc] [llvm] [APFloat] Add exp function for APFloat::IEEESsingle using expf implementation from LLVM libc. (PR #143959)

Nikita Popov via libc-commits libc-commits at lists.llvm.org
Sat Jul 19 08:11:58 PDT 2025


================
@@ -644,6 +644,17 @@ endif()
 
 set(LLVM_ENABLE_Z3_SOLVER_DEFAULT "${Z3_FOUND}")
 
+set(LLVM_INTEGRATE_LIBC "OFF" CACHE STRING "Use LLVM libc code directly if available.")
+
+if(LLVM_INTEGRATE_LIBC)
+  message(STATUS "LLVM_INTEGRATE_LIBC is ${LLVM_INTEGRATE_LIBC}")
+  include(FindLibcCommonUtils)
+  if(NOT TARGET llvm-libc-common-utilities)
+    message(STATUS "LLVM_INTEGRATE_LIBC is set but cannot find LLVM libc at ${libc_path}.")
+    set(LLVM_INTEGRATE_LIBC OFF)
+  endif()
+endif()
+
----------------
nikic wrote:

I think this is fine, with the caveat that the relevant parts of libc actually need to build on the full matrix of compilers, operating systems and build environments supported by LLVM. Looking at https://libc.llvm.org/platform_support.html it sounds like macOS and Windows are not considered first tier targets for libc. How does the support for just the FP library look like? What kind of testing does it receive outside "recent Linux"?

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


More information about the libc-commits mailing list