Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are various ways to use the newest LLVM/Clang version.</p> <p>(1) <strong>Plugins</strong>, as described in the comments above, e.g.: <a href="http://blog.wadetregaskis.com/tot-clang-llvm-in-xcode/" rel="nofollow">http://blog.wadetregaskis.com/tot-clang-llvm-in-xcode/</a></p> <p>As pointed out in the linked blog post, you may get errors/warnings from Xcode's real-time syntax checking as Xcode uses an older version of libclang (more on that under (3)). It is likely to compile fine, but editing source code won't be a lot of fun.</p> <p>(2) Set the compiler via the <strong><code>CC</code> flag</strong>. This is probably the easiest/fastest solution and the setting only affects one project. Go to the project's Build Settings, choose "Add Build Setting" -> "Add User-Defined Setting" (in Xcode 5, this is hidden in the <em>Editor</em> menu), name it <code>CC</code> and set the value to the path of your version of Clang. Worked fine for me, but as with (1), you might get conflicts with the live error reporting, especially if you want to use new syntax such as literals, or pass flags for warnings that the older version does not understand.</p> <p>(3) <strong>Replace</strong> the compiler. Make sure you back up any files before replacing them. There are two files that need to be replaced: the Clang binary, and libclang.dylib. Go to <code>/Applications/Xcode.app/</code> -> Option-Click -> "Show Package Contents" -> <code>/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr</code>. clang is in <code>/bin</code>, libclang.dylib is in <code>/lib</code>.</p> <p>Both binaries can either be compiled from source (which will give you an even newer version, of course) or just copied from the latest Xcode package. I ran into trouble using a customised version of libclang, but I suspect the problem originates from my modifications there. If in doubt, use libclang from a later Xcode version.</p> <p><em>Note:</em> My modified libclang binary used ARC and is therefore incompatible with Xcode 4 which runs with garbage collection. Xcode 5 itself uses ARC so the problem has vanished. If you compile libclang unmodified, you shouldn't come across the issue in either Xcode 4 or 5.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload