[Clang] Disable `libc` headers for offloading languages
authorJoseph Huber <jhuber6@vols.utk.edu>
Thu, 22 Jun 2023 19:03:18 +0000 (14:03 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Thu, 22 Jun 2023 19:12:32 +0000 (14:12 -0500)
commit767852b1a8e38b87fc9a20a28adb0056d1bf2cb8
treed0d0e8b9c282ef5c6b90badfb1d09083bb9fb0ec
parent1d53f3bb7328a4fe2881a04aa1754ba57b20b380
[Clang] Disable `libc` headers for offloading languages

These headers are currently broken when included from the offloading
languages like OpenMP, OpenCL, CUDA, and HIP. Turn this logic off so we
can compile these languages when the GPU libc is installed. I am
currently trying to remedy this and have made an RFC for it in libc,
see https://discourse.llvm.org/t/rfc-implementing-gpu-headers-in-the-llvm-c-library/71523.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D153578
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/gpu-libc-headers.c