[Openmp-commits] [openmp] 8ab7b37 - [OpenMP][test] Remove %flags-use-compiler-omp-h (#188789)
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Mar 27 02:59:10 PDT 2026
Author: Michael Kruse
Date: 2026-03-27T10:59:06+01:00
New Revision: 8ab7b37e749f4ab7c4536fec82cb813586d9f334
URL: https://github.com/llvm/llvm-project/commit/8ab7b37e749f4ab7c4536fec82cb813586d9f334
DIFF: https://github.com/llvm/llvm-project/commit/8ab7b37e749f4ab7c4536fec82cb813586d9f334.diff
LOG: [OpenMP][test] Remove %flags-use-compiler-omp-h (#188789)
With the standalone and project builds removed,
`OPENMP_TEST_COMPILER_HAS_OMP_H`/`config.test_compiler_has_omp_h` is set
to constant 1, which causes the `config.omp_header_directory` search
path NOT to be added to `%flags-use-compiler-omp-h`, causing the system
`omp.h` used, or the only test actually using it
(`omp50_taskdep_depobj.c`) failing if that one is not available.
The intention of `OPENMP_TEST_COMPILER_HAS_OMP_H` was to use gcc's
`omp.h` which declares `omp_depend_t` differently than our `omp.h`
(https://reviews.llvm.org/D108790). Using `OPENMP_TEST_C_COMPILER=gcc`
was used to test libomp's GOMP compatibility layer, but testing it is
currently unmaintained and has no buildbot (60 failing tests out of 389
with gcc-13, not including OMPD and OMPT). If updating testing for GOMP,
then gcc's own `omp.h` must be used for all tests: using the GOMP ABI
requires using GOMP's `omp.h`.
Closes: #187879
Added:
Modified:
openmp/cmake/OpenMPTesting.cmake
openmp/runtime/test/CMakeLists.txt
openmp/runtime/test/lit.cfg
openmp/runtime/test/lit.site.cfg.in
openmp/runtime/test/tasking/omp50_taskdep_depobj.c
Removed:
################################################################################
diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index e6eb444c5f90f..4128b2462259d 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -45,7 +45,6 @@ function(set_test_compiler_information dir)
set(OPENMP_TEST_COMPILER_OPENMP_FLAGS "${OPENMP_TEST_C_COMPILER_OPENMP_FLAGS}" PARENT_SCOPE)
set(OPENMP_TEST_COMPILER_HAS_TSAN_FLAGS "${OPENMP_TEST_C_COMPILER_HAS_TSAN_FLAGS}" PARENT_SCOPE)
set(OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS "${OPENMP_TEST_C_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS}" PARENT_SCOPE)
- set(OPENMP_TEST_COMPILER_HAS_OMP_H "${OPENMP_TEST_C_COMPILER_HAS_OMP_H}" PARENT_SCOPE)
# Determine major version.
string(REGEX MATCH "[0-9]+" major "${OPENMP_TEST_C_COMPILER_VERSION}")
@@ -74,7 +73,6 @@ if(TARGET tsan)
else()
set(OPENMP_TEST_COMPILER_HAS_TSAN_FLAGS 0)
endif()
-set(OPENMP_TEST_COMPILER_HAS_OMP_H 1)
set(OPENMP_TEST_COMPILER_OPENMP_FLAGS "-fopenmp ${OPENMP_TEST_COMPILER_THREAD_FLAGS}")
set(OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS 1)
diff --git a/openmp/runtime/test/CMakeLists.txt b/openmp/runtime/test/CMakeLists.txt
index cbcd0c155f062..782e41692e1e1 100644
--- a/openmp/runtime/test/CMakeLists.txt
+++ b/openmp/runtime/test/CMakeLists.txt
@@ -34,7 +34,6 @@ pythonize_bool(LIBOMP_OMPX_TASKGRAPH)
pythonize_bool(LIBOMP_HAVE_LIBM)
pythonize_bool(LIBOMP_HAVE_LIBATOMIC)
pythonize_bool(OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS)
-pythonize_bool(OPENMP_TEST_COMPILER_HAS_OMP_H)
add_library(ompt-print-callback INTERFACE)
target_include_directories(ompt-print-callback INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/ompt)
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 6d93789f2d44e..6791fbd2adb43 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -76,8 +76,6 @@ if config.target_arch == "s390x":
flags += " -mbackchain"
config.test_flags = " -I " + config.omp_header_directory + flags
-config.test_flags_use_compiler_omp_h = flags
-
# extra libraries
libs = ""
@@ -213,16 +211,6 @@ config.substitutions.append(("%libomp-run", "%t"))
config.substitutions.append(("%clangXX", config.test_cxx_compiler))
config.substitutions.append(("%clang", config.test_c_compiler))
config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
-# %flags-use-compiler-omp-h allows us to use the test compiler's omp.h file which
-# may have
diff erent definitions of structures than our omp.h file.
-if config.test_compiler_has_omp_h:
- config.substitutions.append(("%flags-use-compiler-omp-h",
- config.test_flags_use_compiler_omp_h))
-else:
- # If testing the runtime within an LLVM tree, then always include omp.h
- # directory associated with the new clang compiler.
- config.substitutions.append(("%flags-use-compiler-omp-h",
- config.test_flags))
config.substitutions.append(("%flags", config.test_flags))
config.substitutions.append(("%python", '"%s"' % (sys.executable)))
config.substitutions.append(("%not", config.test_not))
diff --git a/openmp/runtime/test/lit.site.cfg.in b/openmp/runtime/test/lit.site.cfg.in
index 7a51545b86fe1..1e31efcde4710 100644
--- a/openmp/runtime/test/lit.site.cfg.in
+++ b/openmp/runtime/test/lit.site.cfg.in
@@ -4,7 +4,6 @@ config.test_c_compiler = "@OPENMP_TEST_C_COMPILER@"
config.test_cxx_compiler = "@OPENMP_TEST_CXX_COMPILER@"
config.test_fortran_compiler = "@OPENMP_TEST_Fortran_COMPILER@"
config.test_compiler_features = @OPENMP_TEST_COMPILER_FEATURES@
-config.test_compiler_has_omp_h = @OPENMP_TEST_COMPILER_HAS_OMP_H@
config.test_filecheck = "@OPENMP_FILECHECK_EXECUTABLE@"
config.test_not = "@OPENMP_NOT_EXECUTABLE@"
config.test_openmp_flags = "@OPENMP_TEST_OPENMP_FLAGS@"
diff --git a/openmp/runtime/test/tasking/omp50_taskdep_depobj.c b/openmp/runtime/test/tasking/omp50_taskdep_depobj.c
index 3c7912bfe715d..2458923192a9d 100644
--- a/openmp/runtime/test/tasking/omp50_taskdep_depobj.c
+++ b/openmp/runtime/test/tasking/omp50_taskdep_depobj.c
@@ -1,4 +1,4 @@
-// RUN: %clang %openmp_flags %flags-use-compiler-omp-h %s -o %t && %libomp-run
+// RUN: %clang %openmp_flags %flags %s -o %t && %libomp-run
// UNSUPPORTED: gcc-5, gcc-6, gcc-7, gcc-8
// UNSUPPORTED: clang-5, clang-6, clang-7, clang-8, clang-9, clang-10
// UNSUPPORTED: icc
More information about the Openmp-commits
mailing list