[libc] [llvm] [APFloat] Add exp function for APFloat::IEEESsingle using expf implementation from LLVM libc. (PR #143959)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 10:15:48 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()
+
----------------
AaronBallman wrote:
I'm not certain what the benefits are to allowing it to be configured like this. Clang needs APFloat for constant expression support, which will be necessary for us to support builtins in a way that work for libc++, so it seems to me that an unconditional dependency is necessary. I suppose the benefit to this would be that you could build LLVM without llvm-libc if you don't need all the math support here? But is that an important use case to support?
https://github.com/llvm/llvm-project/pull/143959
More information about the llvm-commits
mailing list