[cfe-dev] Libtool search path on MacOS
scott constable via cfe-dev
cfe-dev at lists.llvm.org
Mon Jun 26 14:40:34 PDT 2017
Your workaround should work, but it shouldn't be this difficult.
Take a look at
https://clang.llvm.org/doxygen/InitHeaderSearch_8cpp_source.html, lines
456-479. Since OSX 10.9, /usr/include/c++/v1 just doesn't exist. Clang
should instead use /Library/Developer/CommandLineTools/usr/include/c++/v1
and/or the XCode .app for libc++. Unless anyone disagrees, I'm going to
file this as a bug report.
On Mon, Jun 26, 2017 at 5:21 PM, Jacob Carlborg via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> On 2017-06-26 22:58, scott constable via cfe-dev wrote:
>
>> I just found the rest of the thread here:
>> https://lists.apple.com/archives/xcode-users/2017/Jan/msg00089.html. The
>> upshot is that C++ headers are no longer installed to /usr/include on
>> MacOS. When you install the Xcode command-line tools, the C++ headers
>> are stored in /Library/Developer/CommandLineTools/usr/include/c++/v1. So
>> libtools built on MacOS should look here instead of /usr/include/c++/v1.
>> How can this be done?
>>
>
> I'm not that familiar with libtools, I've only used the C API in libclang.
> In libclang you call the clang_parseTranslationUnit function and pass in
> the command line arguments that were passed to your application. It's
> possible to add an additional include search path before calling
> clang_parseTranslationUnit by adding ["-I", "/Library/Developer/CommandLineTools/usr/include/c++/v1"]
> to the command line arguments array. I'm not sure it's possible to do the
> same using libtools.
>
>
> --
> /Jacob Carlborg
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170626/6d925820/attachment.html>
More information about the cfe-dev
mailing list