[Openmp-commits] [PATCH] D117715: [openmp] Always pass valid triple to openmp-targets when using newRTL

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 19 12:55:25 PST 2022


JonChesterfield created this revision.
JonChesterfield added reviewers: jhuber6, tianshilei1992, jdoerfert.
Herald added subscribers: guansong, yaxunl.
JonChesterfield requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

Previously, we sometimes pass fopenmp-targets=nvptx64-nvidia-cuda-newRTL


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117715

Files:
  openmp/libomptarget/test/lit.cfg


Index: openmp/libomptarget/test/lit.cfg
===================================================================
--- openmp/libomptarget/test/lit.cfg
+++ openmp/libomptarget/test/lit.cfg
@@ -107,6 +107,12 @@
     else:
         config.test_flags += " -fno-openmp-target-new-runtime"
 
+def remove_newRTL_suffix_if_present(name):
+    if name.endswith('-newRTL'):
+        return name[:-7]
+    else:
+        return name
+
 # substitutions
 # - for targets that exist in the system create the actual command.
 # - for valid targets that do not exist in the system, return false, so that the
@@ -170,9 +176,11 @@
             libomptarget_target, \
             "%not --crash %t"))
         config.substitutions.append(("%clangxx-" + libomptarget_target, \
-            "%clangxx %openmp_flags %cuda_flags %flags -fopenmp-targets=" + libomptarget_target))
+                                     "%clangxx %openmp_flags %cuda_flags %flags -fopenmp-targets=" +\
+                                     remove_newRTL_suffix_if_present(libomptarget_target)))
         config.substitutions.append(("%clang-" + libomptarget_target, \
-            "%clang %openmp_flags %cuda_flags %flags -fopenmp-targets=" + libomptarget_target))
+                                     "%clang %openmp_flags %cuda_flags %flags -fopenmp-targets=" +\
+                                     remove_newRTL_suffix_if_present(libomptarget_target)))
         config.substitutions.append(("%fcheck-" + libomptarget_target, \
             config.libomptarget_filecheck + " %s"))
     else:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117715.401376.patch
Type: text/x-patch
Size: 1548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220119/102e2863/attachment.bin>


More information about the Openmp-commits mailing list