diff --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg index 0dcb640b3af33e..c21dcccf4f6954 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: