[CUDA] Move CUDA SDK include path further down the include search path.
authorArtem Belevich <tra@google.com>
Mon, 27 Sep 2021 22:16:05 +0000 (15:16 -0700)
committerArtem Belevich <tra@google.com>
Tue, 28 Sep 2021 18:29:28 +0000 (11:29 -0700)
commitfd582eeffe582665eacac522617a15e17e9872cd
tree303dca33a2e95d665c0fc4153672bea642304c5f
parentbfa50250b6429e9e55f849c07c11ece33e9340cd
[CUDA] Move CUDA SDK include path further down the include search path.

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

Differential Revision: https://reviews.llvm.org/D110596
clang/lib/Driver/ToolChains/Cuda.cpp
clang/test/Driver/cuda-detect.cu