[Openmp-commits] [openmp] 8c626fc - [Libomptarget] Reintroduce host architecture checks for device RTL

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 25 14:01:28 PDT 2022


Author: Joseph Huber
Date: 2022-07-25T17:01:12-04:00
New Revision: 8c626fc0c8a904c0040a36561edd9b62ac3b71b4

URL: https://github.com/llvm/llvm-project/commit/8c626fc0c8a904c0040a36561edd9b62ac3b71b4
DIFF: https://github.com/llvm/llvm-project/commit/8c626fc0c8a904c0040a36561edd9b62ac3b71b4.diff

LOG: [Libomptarget] Reintroduce host architecture checks for device RTL

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

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D130509

Added: 
    

Modified: 
    openmp/libomptarget/DeviceRTL/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 04ee959d5d6ab..ce66214822a2c 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -18,6 +18,12 @@ if (NOT LIBOMPTARGET_BUILD_DEVICERTL_BCLIB)
   return()
 endif()
 
+# Check to ensure the host system is a supported host architecture.
+if(NOT ${CMAKE_SIZEOF_VOID_P} EQUAL "8")
+  libomptarget_say("Not building DeviceRTL: Runtime does not support 32-bit hosts")
+  return()
+endif()
+
 if (LLVM_DIR)
   # Builds that use pre-installed LLVM have LLVM_DIR set.
   # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route


        


More information about the Openmp-commits mailing list