Skip to content

Commit 8fd97f2

Browse files
committed
Revert "[OpenMP] [test] Don't use the compiler's omp.h in tasking/omp50_taskdep_depobj.c"
This reverts commit b3b3ffd.
1 parent d948799 commit 8fd97f2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

openmp/runtime/test/lit.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ if config.target_arch == "s390x":
7373
flags += " -mbackchain"
7474

7575
config.test_flags = " -I " + config.omp_header_directory + flags
76+
config.test_flags_use_compiler_omp_h = flags
7677

7778

7879
# extra libraries
@@ -209,6 +210,16 @@ config.substitutions.append(("%libomp-run", "%t"))
209210
config.substitutions.append(("%clangXX", config.test_cxx_compiler))
210211
config.substitutions.append(("%clang", config.test_c_compiler))
211212
config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
213+
# %flags-use-compiler-omp-h allows us to use the test compiler's omp.h file which
214+
# may have different definitions of structures than our omp.h file.
215+
if config.is_standalone_build and config.test_compiler_has_omp_h:
216+
config.substitutions.append(("%flags-use-compiler-omp-h",
217+
config.test_flags_use_compiler_omp_h))
218+
else:
219+
# If testing the runtime within an LLVM tree, then always include omp.h
220+
# directory associated with the new clang compiler.
221+
config.substitutions.append(("%flags-use-compiler-omp-h",
222+
config.test_flags))
212223
config.substitutions.append(("%flags", config.test_flags))
213224
config.substitutions.append(("%python", '"%s"' % (sys.executable)))
214225
config.substitutions.append(("%not", config.test_not))

openmp/runtime/test/tasking/omp50_taskdep_depobj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang %openmp_flags %flags %s -o %t && %libomp-run
1+
// RUN: %clang %openmp_flags %flags-use-compiler-omp-h %s -o %t && %libomp-run
22
// UNSUPPORTED: gcc-5, gcc-6, gcc-7, gcc-8
33
// UNSUPPORTED: clang-5, clang-6, clang-7, clang-8, clang-9, clang-10
44
// UNSUPPORTED: icc

0 commit comments

Comments
 (0)