diff options
author | Joachim <jenke@itc.rwth-aachen.de> | 2024-02-27 16:24:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 16:24:55 +0100 |
commit | 822142ffdfbe93f213c2c6b3f2aec7fe5f0af072 (patch) | |
tree | 352cf43746a96941e659c1bcc48a04a1ea0c52f6 /openmp/libompd | |
parent | 48bc9022b49cc452bd871c4942e5a059d226c9eb (diff) | |
download | llvm-822142ffdfbe93f213c2c6b3f2aec7fe5f0af072.zip llvm-822142ffdfbe93f213c2c6b3f2aec7fe5f0af072.tar.gz llvm-822142ffdfbe93f213c2c6b3f2aec7fe5f0af072.tar.bz2 |
[OpenMP][OMPD] libompd must not link libomp (#83119)
Fixes a regression introduced in 91ccd8248.
The code for libompd includes kmp.h for enum kmp_sched. The dependency
to hwloc is not necessary. Avoid the dependency by skipping the
definitions in kmp.h using types from hwloc.h.
Fixes #80750
Diffstat (limited to 'openmp/libompd')
-rw-r--r-- | openmp/libompd/src/CMakeLists.txt | 3 | ||||
-rw-r--r-- | openmp/libompd/src/omp-icv.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/openmp/libompd/src/CMakeLists.txt b/openmp/libompd/src/CMakeLists.txt index 0402a01..ba228d5 100644 --- a/openmp/libompd/src/CMakeLists.txt +++ b/openmp/libompd/src/CMakeLists.txt @@ -13,7 +13,8 @@ cmake_minimum_required(VERSION 3.20.0) add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp) -target_link_libraries(ompd omp) # ensure generated import library is created first +# libompd must not link against libomp, there is no code dependency. +add_dependencies(ompd omp) # ensure generated import library is created first set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") diff --git a/openmp/libompd/src/omp-icv.cpp b/openmp/libompd/src/omp-icv.cpp index 4a2c2b6..0288e96 100644 --- a/openmp/libompd/src/omp-icv.cpp +++ b/openmp/libompd/src/omp-icv.cpp @@ -18,7 +18,9 @@ #include "omp.h" #include "ompd-private.h" #include "TargetValue.h" +#define OMPD_SKIP_HWLOC 1 #include "kmp.h" +#undef OMPD_SKIP_HWLOC #include <cstring> /* The ICVs ompd-final-var and ompd-implicit-var below are for backward |