Page MenuHomeSolus

clang: enable openmp, fixes T6671
ClosedPublic

Authored by mati865 on Aug 3 2018, 3:10 PM.
Tags
None
Referenced Files
F11018288: D3488.diff
Sun, Aug 6, 10:57 AM
F10850172: D3488.id8710.diff
Jun 12 2023, 1:31 AM
F10846536: D3488.id8710.diff
Jun 11 2023, 5:24 AM
F10841804: D3488.id8710.diff
Jun 10 2023, 8:55 AM
F10814251: D3488.id8579.diff
May 31 2023, 2:55 PM
F10813763: D3488.id8604.diff
May 31 2023, 12:53 PM
F10813279: D3488.diff
May 31 2023, 10:51 AM
F10694151: D3488.id.diff
Apr 25 2023, 11:02 AM

Details

Summary

This adds openmp support for clang.

Test Plan

Save example from https://www.dartmouth.edu/~rc/classes/intro_openmp/hello_world_openmp.html and test with clang -fopenmp omp_test.c && ./a.out, it should create number of threads equal to the number of logical CPUs.
Do the same for 32 bit platform with clang -fopenmp -m32 omp_test.c && ./a.out.

Diff Detail

Repository
R1972 llvm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pspec_x86_64.xml
22–24

Not sure if it's expected

49

The same as above

sunnyflunk added a subscriber: sunnyflunk.

It still includes /usr/lib64/libgomp.so in the llvm package, which I believe is a symlink to libiomp5.so or libomp5.so, so it is correct that the symlink in llvm requires llvm-clang installed to resolve the file. That is ypkg working correctly by adding it as a dependency. They don't need to exist in a pattern to be included as everything ends up in the base package not matching a pattern within the package.yml or preset patterns in ypkg internally. Deleting libgomp's will fix it up.

I do have some big plans for LLVM/Clang, doing a full proper PGO build using it's own tooling, libc++ etc and making clang builds default to its own tools and libs. Then it will be a real option in solbuild to compete against GCC builds. However, since it will more than double the build time and take many many tries to get it right, it is awaiting something more powerful than my i3-6100U to sort it out on.

package.yml
59

Lets remove this comment and use it later.

294–297

Either find a clang build option to disable libgomp symlinks, or need to add

# Do NOT include libgomp*, it will conflict with libgomp
rm $installdir/usr/lib{32,64}/libgomp.*
pspec_x86_64.xml
22–24

It is because...

39

He's still here. Once this is gone, so will the new dependency. Ditto for the 32bit packages

This revision now requires changes to proceed.Aug 4 2018, 12:09 AM

Do we need openmp for emul32 here? It seems to me it can be disabled like lld and lldb for emul32.

Addressing review comments

Do we need openmp for emul32 here? It seems to me it can be disabled like lld and lldb for emul32.

I think it's good to have, those libs together are below 800 KiB and without them you cannot build 32 bit programs using openmp with clang.

sunnyflunk edited the test plan for this revision. (Show Details)

LGTM

This revision is now accepted and ready to land.Aug 7 2018, 2:11 AM
This revision was automatically updated to reflect the committed changes.