This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fixed include directories for OpenMP when building OpenMP with LLVM_ENABLE_RUNTIMES
ClosedPublic

Authored by tianshilei1992 on Jan 12 2021, 10:59 AM.

Details

Summary

Some LLVM headers are generated by CMake. Before the installation,
LLVM's headers are distributed everywhere, some of which are in
${LLVM_SRC_ROOT}/llvm/include/llvm, and some are in
${LLVM_BINARY_ROOT}/include/llvm. After intallation, they're all in
${LLVM_INSTALLATION_ROOT}/include/llvm.

OpenMP now depends on LLVM headers. Some headers depend on headers generated
by CMake. When building OpenMP along with LLVM, a.k.a via LLVM_ENABLE_RUNTIMES,
we need to tell OpenMP where it can find those headers, especially those still
have not been copied/installed.

Diff Detail

Event Timeline

tianshilei1992 requested review of this revision.Jan 12 2021, 10:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2021, 10:59 AM
tianshilei1992 edited the summary of this revision. (Show Details)Jan 12 2021, 11:03 AM
This revision is now accepted and ready to land.Jan 12 2021, 11:06 AM
jhuber6 accepted this revision.Jan 12 2021, 11:31 AM

I tested it with a clean build using GCC 8.3 and CUDA 10.1, the resulting compiler successfuly built an offloading application that ran on the CUDA device. LGTM.

This revision was landed with ongoing or failed builds.Jan 12 2021, 11:32 AM
This revision was automatically updated to reflect the committed changes.