[libc] Make clang-tidy use host compiler's resource dir.
authorPaula Toth <paulatoth@google.com>
Fri, 22 May 2020 00:39:03 +0000 (17:39 -0700)
committerPaula Toth <paulatoth@google.com>
Fri, 22 May 2020 01:40:59 +0000 (18:40 -0700)
commit2a4c30985ded329d64357f5535d2ff2a3f955c81
tree1afcbfe473f0503a25024f09b7af44c0f73d1ff9
parent54c2c2add7ad42ce1910a276cd1cd2912af4cddd
[libc] Make clang-tidy use host compiler's resource dir.

Summary: When building llvm-libc with linting enabled, clang-tidy would use the resource dir of the monorepo rather then the host compiler's resource dir. This presented issues when including headers from the host compiler e.g. for sanitizers. Therefore this patch explicitly tells clang-tidy to use the host compiler's resource dir.

Reviewers: sivachandra

Reviewed By: sivachandra

Subscribers: mgorny, tschuett, ecnelises, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D80265
libc/CMakeLists.txt
libc/cmake/modules/LLVMLibCHeaderRules.cmake
libc/cmake/modules/LLVMLibCObjectRules.cmake