diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt --- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt +++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt @@ -18,6 +18,12 @@ return() endif() +# 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() +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