[cfe-dev] Clang 3.1 on MacOSX xcode?

Luc Bourhis luc_j_bourhis at mac.com
Mon May 14 21:25:17 PDT 2012

Hi Joël,

another way to do it is than the .xcconfig is to create a custom plug-in for Clang 3.1 or even Clang ToT or any version you install yourself. Then in  your project Build Settings > Build Options > Compiler for C/C++/Objective-C, you will be able to add Clang 3.1 to the drop-down menu. The advantage is that you need to create that plug-in once and then you can use it for any future project without having to add that .xcconfig file every time you create a new project. Note also that several section banners in the Build Settings will have their name change to reflect your choice, e.g. "<here the name you chose for your compiler> - Code Generation".

Please find attached the one I have written for myself. You have to expand it in the directory "Library/Application Support/Developer/Shared/Xcode/Plug-ins". Note that this is not a hack by any mean as XCode (version 3 or 4) uses such plugin itself. You will notice that I called the compiler "LLVM/Clang ToT" and XCode is told to find it in /usr/local/bin. You can change those info to whatever you like. "LLVM/Clang 3.1" would be a better name in your case.


Luc Bourhis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Clang LLVM Trunk.xcplugin.zip
Type: application/zip
Size: 4498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120515/4c97152e/attachment.zip>

More information about the cfe-dev mailing list