[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 14:07:35 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGce8f365884e9: [openmp] Always pass valid triple to openmp-targets when using newRTL (authored by JonChesterfield).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117715/new/

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.401399.patch
Type: text/x-patch
Size: 1548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220119/c83f8f3f/attachment.bin>


More information about the Openmp-commits mailing list