[Openmp-commits] [PATCH] D142023: [OpenMP] Disable building `libomptarget` on 32-bit systems

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 18 10:40:16 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG57662cb2e375: [OpenMP] Disable building `libomptarget` on 32-bit systems (authored by tianshilei1992).

Changed prior to commit:
  https://reviews.llvm.org/D142023?vs=490163&id=490233#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142023/new/

https://reviews.llvm.org/D142023

Files:
  openmp/CMakeLists.txt


Index: openmp/CMakeLists.txt
===================================================================
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -74,7 +74,8 @@
 # Currently libomptarget cannot be compiled on Windows or MacOS X.
 # Since the device plugins are only supported on Linux anyway,
 # there is no point in trying to compile libomptarget on other OSes.
-if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP17_FLAG)
+# 32-bit systems are not supported either.
+if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP17_FLAG OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(ENABLE_LIBOMPTARGET OFF)
 endif()
 
@@ -100,6 +101,8 @@
     message(FATAL_ERROR "libomptarget cannot be built on Windows and MacOS X!")
   elseif (NOT OPENMP_HAVE_STD_CPP17_FLAG)
     message(FATAL_ERROR "Host compiler must support C++17 to build libomptarget!")
+  elseif (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
+    message(FATAL_ERROR "libomptarget on 32-bit systems are not supported!")
   endif()
 
   add_subdirectory(libomptarget)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142023.490233.patch
Type: text/x-patch
Size: 998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230118/f8a989bf/attachment.bin>


More information about the Openmp-commits mailing list