This is an archive of the discontinued LLVM Phabricator instance.

Implement GetSystemIncludeDirectories for macOS
AbandonedPublic

Authored by teemperor on Apr 28 2019, 7:21 AM.

Details

Reviewers
aprantl
Summary

GetSystemIncludeDirectories is currently only implemented for Linux where it returns /usr/include with a potential sysroot
as a prefix. This patch implements the equivalent functionality on macOS.

Diff Detail

Event Timeline

teemperor created this revision.Apr 28 2019, 7:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2019, 7:21 AM
aprantl added inline comments.Apr 29 2019, 12:24 PM
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
244

I'm not 100% sure if that is how Clang header search works, but I believe that these paths should be returned relative to the sysroot, no?

244

... and we should set sysroot separately.

244

Doing it this way may work but it would be different from how a regular clang invocation works, and that is prone to subtle bugs.

teemperor abandoned this revision.Sep 23 2019, 12:47 AM

This is no longer necessary as we abandon the "reimplement include directories" approach (we now look at the support files or require -gmodules which both provide the same information in a more reliable way).