[Openmp-commits] [openmp] [OpenMP] Add libomp unit test infrastructure (PR #168063)

Robert Imschweiler via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 17 02:27:26 PST 2025


================
@@ -174,17 +174,26 @@ if(NOT WIN32)
 endif()
 
 # Add the OpenMP library
+
+# First, create an OBJECT library with all the runtime sources.
+# This allows both the main library and unit tests to link against the same compiled objects.
+add_library(omp_objects OBJECT ${LIBOMP_SOURCE_FILES})
----------------
ro-i wrote:

I found that there already exists an exports file that uses a wildcard to export everything. So, I now just added a testing version of libomp that uses this test exports file. Then the unit tests can be dynamically linked against that.
Afaiu, the original libomp is completely unaffected by my changes (this is very important ofc)

https://github.com/llvm/llvm-project/pull/168063


More information about the Openmp-commits mailing list