[clang] Fix search path logic for C_INCLUDE_DIRS
authorLouis Dionne <ldionne@apple.com>
Thu, 20 Feb 2020 17:33:17 +0000 (12:33 -0500)
committerLouis Dionne <ldionne@apple.com>
Thu, 20 Feb 2020 17:35:15 +0000 (12:35 -0500)
commit6fa3894c4e771c773712b1ae777f78c1c922a908
treec8a9d53550ed33000a7dc451d352b7a783e2472f
parent0ed7a61543840ddfe4dcc71307dd77b032dcca6c
[clang] Fix search path logic for C_INCLUDE_DIRS

For each absolute path given to C_INCLUDE_DIRS, we want it to be added
as-is to the include search path. Relative paths should be prefixed
with the sysroot.

Thanks to Marco Hinz for the patch.

Differential Revision: https://reviews.llvm.org/D69221
clang/lib/Driver/ToolChains/Darwin.cpp
clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/lib/Driver/ToolChains/Hurd.cpp
clang/lib/Driver/ToolChains/Linux.cpp
clang/lib/Driver/ToolChains/Solaris.cpp
clang/lib/Driver/ToolChains/WebAssembly.cpp