This is an archive of the discontinued LLVM Phabricator instance.

[clang][OpenMP] Fix build when using libgomp
ClosedPublic

Authored by rupprecht on Mar 20 2019, 1:21 PM.

Details

Summary

rL356570 introduced a test which only passes with the default openmp library, libomp, and fails with other openmp libraries, such as libgomp. Explicitly choose libomp.

Event Timeline

rupprecht created this revision.Mar 20 2019, 1:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2019, 1:21 PM

Interesting.
What happens if libomp is not being built?
What happens if libomp is not present?

Or more generally, why does it even matter whether there is runtime or not, this only does paring+sema, no codegen/execution.

If the compiler is built without OpenMP support -fopenmp is converted to -fopenmp=libgomp frontend option.

This revision is now accepted and ready to land.Mar 20 2019, 1:42 PM

Interesting.
What happens if libomp is not being built?
What happens if libomp is not present?

I'm far from an omp expert (only running across this because some tests failed), but I would guess both those cases to break.

But this is broken anyway when libomp isn't being used. So the set of broken cases is going from (people that don't use libomp) to (people that don't have libomp) which I think is a much smaller subset.

Or more generally, why does it even matter whether there is runtime or not, this only does paring+sema, no codegen/execution.

I'm very surprised myself. Hence my question "has something gone wrong" on D59214. Hopefully this fix/hack can be reverted once that's figured out.

This revision was automatically updated to reflect the committed changes.