[Openmp-commits] [openmp] ce8f365 - [openmp] Always pass valid triple to openmp-targets when using newRTL

Jon Chesterfield via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 19 14:07:32 PST 2022


Author: Jon Chesterfield
Date: 2022-01-19T22:07:22Z
New Revision: ce8f365884e99e502b1d04ab2922aa5af7ef2b96

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

LOG: [openmp] Always pass valid triple to openmp-targets when using newRTL

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

Reviewed By: jhuber6

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

Added: 
    

Modified: 
    openmp/libomptarget/test/lit.cfg

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg
index 0dcb640b3af33..c21dcccf4f695 100644
--- a/openmp/libomptarget/test/lit.cfg
+++ b/openmp/libomptarget/test/lit.cfg
@@ -107,6 +107,12 @@ else: # Unices
     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 @@ for libomptarget_target in config.libomptarget_all_targets:
             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:


        


More information about the Openmp-commits mailing list