Skip to content

Commit d3748d9

Browse files
committed
[Libomptarget] Fix test logic for optionally adding the libcgpu.a
Summary: This was not operating as expected and was causing the build to fail on non-configured systems.
1 parent 7a98f08 commit d3748d9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

openmp/libomptarget/test/lit.cfg

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ for libomptarget_target in config.libomptarget_all_targets:
216216
"%libomptarget-run-" + libomptarget_target))
217217
config.substitutions.append(("%libomptarget-compilexx-" + \
218218
libomptarget_target, \
219-
"%clangxx-" + libomptarget_target + " %s -o %t" \
220-
" -lcgpu" if config.libomptarget_has_libc else ""))
219+
"%clangxx-" + libomptarget_target + " %s -o %t" + \
220+
(" -lcgpu" if config.libomptarget_has_libc else "")))
221221
config.substitutions.append(("%libomptarget-compile-" + \
222222
libomptarget_target, \
223-
"%clang-" + libomptarget_target + " %s -o %t"
224-
" -lcgpu" if config.libomptarget_has_libc else ""))
223+
"%clang-" + libomptarget_target + " %s -o %t" +
224+
(" -lcgpu" if config.libomptarget_has_libc else "")))
225225
config.substitutions.append(("%libomptarget-compileoptxx-run-and-check-" + \
226226
libomptarget_target, \
227227
"%libomptarget-compileoptxx-and-run-" + libomptarget_target + \
@@ -240,12 +240,12 @@ for libomptarget_target in config.libomptarget_all_targets:
240240
"%libomptarget-run-" + libomptarget_target))
241241
config.substitutions.append(("%libomptarget-compileoptxx-" + \
242242
libomptarget_target, \
243-
"%clangxx-" + libomptarget_target + " -O3 %s -o %t"
244-
" -lcgpu" if config.libomptarget_has_libc else ""))
243+
"%clangxx-" + libomptarget_target + " -O3 %s -o %t" +
244+
(" -lcgpu" if config.libomptarget_has_libc else "")))
245245
config.substitutions.append(("%libomptarget-compileopt-" + \
246246
libomptarget_target, \
247-
"%clang-" + libomptarget_target + " -O3 %s -o %t"
248-
" -lcgpu" if config.libomptarget_has_libc else ""))
247+
"%clang-" + libomptarget_target + " -O3 %s -o %t" +
248+
(" -lcgpu" if config.libomptarget_has_libc else "")))
249249
config.substitutions.append(("%libomptarget-run-" + \
250250
libomptarget_target, \
251251
"%t"))

0 commit comments

Comments
 (0)