This adds openmp support for clang.
Details
- Reviewers
• sunnyflunk - Group Reviewers
Triage Team - Commits
- R1972:607daf5952f6: clang: enable openmp, fixes T6671
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
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 | |
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.