[llvm] Enable logf128 constant folding for hosts with 128bit long double (PR #104929)
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 06:18:14 PDT 2024
================
@@ -271,6 +260,13 @@ if(C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unguarded-availability-new")
endif()
+check_cxx_symbol_exists(logf128 cmath HAS_LOGF128)
+check_symbol_exists(__powerpc64le__ "" __PPC64LE)
+if(HAS_LOGF128 AND NOT __PPC64LE)
+ set(LLVM_HAS_LOGF128 On)
+ add_compile_definitions(HAS_LOGF128)
----------------
RoboTux wrote:
Shouldn't this have a cmakedefine entry in llvm/Config/config.h.cmake instead?
https://github.com/llvm/llvm-project/pull/104929
More information about the llvm-commits
mailing list