[llvm] RuntimeLibcalls: Add bitset for available libcalls (PR #150869)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 03:19:08 PDT 2025


================
@@ -616,6 +618,21 @@ else ()
   endif ()
 endif ()
 
+foreach(i IN ITEMS 8 4)
+  try_compile(SIZEOF_UINTPTR_T_IS_${i}
+    SOURCE_FROM_CONTENT
+    "test-sizeof-uintptr_t.cpp"
+    "#include <cstdint>\n
+     static_assert(sizeof(uintptr_t) == ${i}); int main(){}"
+    CXX_STANDARD 17
+    LOG_DESCRIPTION "testing sizeof(uintptr_t)")
+
+  if(SIZEOF_UINTPTR_T_IS_${i})
+    set(LLVM_NATIVE_ARCH_SIZEOF_UINTPTR_T ${i})
+    break()
+  endif()
+endforeach()
----------------
s-barannikov wrote:

It might be the same as CMAKE_SIZEOF_VOID_P

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


More information about the llvm-commits mailing list