Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenMP][OMPD] libompd must not link libomp #83119

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

jprotze
Copy link
Collaborator

@jprotze jprotze commented Feb 27, 2024

Fixes a regression introduced in 91ccd82.
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

@llvmbot llvmbot added openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime labels Feb 27, 2024
Copy link
Contributor

@shiltian shiltian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit

@@ -13,7 +13,7 @@ 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
add_dependencies(ompd omp) # ensure generated import library is created first
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put a comment here to say, OMPD should never directly link to omp?

Fixes a regression introduced in 91ccd82.
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.
@jprotze jprotze merged commit 822142f into llvm:main Feb 27, 2024
4 checks passed
@jprotze jprotze deleted the issue_80750 branch February 27, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OpenMP] libompd.so depends on libomp.so, but it should not
3 participants