[PATCH] D110827: [LLDB] Provide target specific directories to libclang

Pavel Kosov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 07:43:18 PDT 2021


kpdev42 added a comment.

In D110827#3059120 <https://reviews.llvm.org/D110827#3059120>, @clayborg wrote:

> In D110827#3042820 <https://reviews.llvm.org/D110827#3042820>, @kpdev42 wrote:
>
>> In D110827#3034767 <https://reviews.llvm.org/D110827#3034767>, @clayborg wrote:
>>
>>> LLDB also tests with compilers that were built, like when LLDB builds clang and uses that clang and clang++ that it built to run the test suite. If we had settings in LLDB that users could set, then the test suite would be able to use the include files for the compiler that is being used instead of always defaulting to the system headers.
>>
>> Could you please clarify: "LLDB builds clang" - here you mean clang which was build with LLDB? And I would like to mention that starting from https://reviews.llvm.org/D89013 libcxx puts __config_site header to target specific folder
>
> We often build the full clang compiler during LLDB builds and then use the clang we built as the compiler when running our test suite. So anything we can do to make sure what ever clang we use for building the test suite binaries has all of the headers that it was built with along with any support library headers (libcxx, etc) that would be great.

That's fine, but patch is about *libclang* seeing target specific headers, not clang frontend. While clang frontend obtains system header paths through Toolchain-derived classes (lib/Driver/Toolchain), one has to *explicitly* set those paths when calling libclang. That's exactly what lldb does in CppModuleConfiguration.cpp when evaluating expression.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110827/new/

https://reviews.llvm.org/D110827



More information about the llvm-commits mailing list