[LLVMdev] How to run LLVM3.6.1 on OS X (Yosemite, Xcode6.4) OR how to link bitcode generated by OS X clang with LLVM3.6.1

Christian Schafmeister chris.schaf at verizon.net
Wed Jul 8 07:57:58 PDT 2015


Tim,

I am getting trouble.

Could you provide a bit more detail on where to symlink /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 into?
I’m not sure where my compiler’s real resource hierarchy is.


> On Jul 7, 2015, at 5:31 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> 
>> "/Users/meister/Development/externals-clasp/build/release/bin/clang" -v \
>>    -resource-dir "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.1.0" \
> 
> I still think this is asking for trouble. It might help clang to find
> the libc++ headers (iostream etc, under ../../../include/c++/v1), but
> you're also providing it incorrect copies of its internal headers. A
> better way is to either build libc++ with your Clang or symlink
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
> into your compiler's real resource hierarchy. (I usually symlink,
> myself).
> 
>> I say partial answer because when I try to compile all of my C++ source files some headers are still not found.
> 
> Which headers are missing? I'd hope anything critical in
> XcodeDefault.xctoolchain/usr/include could be provided by your own
> built clang.

I think this is the trouble that I’m asking for above. 

> 
>> Do you know what you would set “-isysroot” to on OS X to get clang3.6.1 to run on OS X?
> 
> I think you got it right with the SDK path you used above:
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
> 
> (modified for the actual SDK version you have installed).
> 
> Cheers.
> 
> Tim.





More information about the llvm-dev mailing list