[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 07:44:40 PST 2023
tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, jhuber6.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
There are plenty of assumptions in `libomptarget` and the device runtime
about the pointer size or `size_t`, etc. 32-bit systems are not supported. There
is no pointer to refine whole things to make it portable. This patch simply disables
building on 32-bit systems.
Repository:
rG LLVM Github Monorepo
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 as well.
+if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP17_FLAG OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ENABLE_LIBOMPTARGET OFF)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142023.490159.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230118/3ff63191/attachment.bin>
More information about the Openmp-commits
mailing list