This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][OpenMP] Add <install-prefix>/include to the search path
Needs ReviewPublic

Authored by pdhaliwal on Mar 26 2021, 1:48 AM.

Details

Summary

Fixes the include error for omp.h as compiler was not looking in the
correct directory.

Diff Detail

Event Timeline

pdhaliwal created this revision.Mar 26 2021, 1:48 AM
pdhaliwal requested review of this revision.Mar 26 2021, 1:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2021, 1:48 AM

Any chance you might be interested in fixing the more general problem, benefiting every clang openmp user, not just amdgpu?
D55725

I was not aware that it was a general problem. I will check if I could get a general solution.

The general problem looks harder but important to fix. Finding the right headers but the wrong shared library is bad, and iirc we currently have to use LD_LIBRARY_PATH to bodge the latter which is not a good UX.

The general problem seems bit more involved. I am not that familiar with how other architectures/systems handle the library/include path. Simplest solution that I can propose right now is to generalise my revision to other architectures for header lookup and similarly for library lookup in case of openmp. If there is better solution available please let me know I will be happy to implement it.