This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Move CUDA SDK include path further down the include search path.
ClosedPublic

Authored by tra on Sep 27 2021, 3:28 PM.

Details

Summary

This allows clang to work on Linux distributions like Debian where
<CUDA-PATH>/include may be a symlink to /usr/include. We only need
cuda_wrappers to be present before the standard C++ library headers.
The CUDA SDK headers themselves do not need to be found that early.

This addresses https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995122
mentioned in post-commit comments on D108247

Diff Detail

Event Timeline

tra created this revision.Sep 27 2021, 3:28 PM
tra requested review of this revision.Sep 27 2021, 3:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2021, 3:28 PM
tra updated this revision to Diff 375425.Sep 27 2021, 3:45 PM
tra edited the summary of this revision. (Show Details)

Fixed the failing test affected by the search path changes.
Disabled addition of CUDA include path if -nogpuinc is in effect.

jlebar accepted this revision.Sep 27 2021, 4:03 PM
This revision is now accepted and ready to land.Sep 27 2021, 4:03 PM
tra added a comment.Sep 28 2021, 10:25 AM

@tambre I've tested the patch on experimental debian docker and it appears to work with a symlink /usr/lib/cuda/include ->/usr/include.

This revision was landed with ongoing or failed builds.Sep 28 2021, 11:30 AM
This revision was automatically updated to reflect the committed changes.
tambre added a comment.Oct 2 2021, 9:42 AM

Thank you for your quick turnaround. I can confirm that this works for me on Debian Unstable with my vendored LLVM.