[Openmp-commits] [PATCH] D130509: [Libomptarget] Reintroduce host architecture checks for device RTL

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 25 12:26:47 PDT 2022

jhuber6 created this revision.
jhuber6 added reviewers: tianshilei1992, JonChesterfield, jdoerfert.
Herald added a subscriber: mgorny.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

A previous patch removed the need to set the auxiliary architecture as
it was no longer needed for the clang invocation after moving to using
the clang frontend. However, this had a second use of preventing
unsupported host architectures from building the device runtime. This
caused failures when trying to build on 32-bit hosts for example.

Fixes #56699

  rG LLVM Github Monorepo



Index: openmp/libomptarget/DeviceRTL/CMakeLists.txt
--- openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -18,6 +18,12 @@
+# Check to ensure the host system is a supported host architecture.
+if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64le|aarch64)")
+  libomptarget_say("Not building DeviceRTL: unknown host arch: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
+  return()
 if (LLVM_DIR)
   # Builds that use pre-installed LLVM have LLVM_DIR set.
   # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130509.447432.patch
Type: text/x-patch
Size: 667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220725/8667f3b2/attachment.bin>

More information about the Openmp-commits mailing list