Search code examples
xcodemacososx-lionllvmclang

How to update LLVM and Clang on Mac OS X


On my version of Mac OS X (10.7.1 (Lion) and Xcode 4.1), there is LLVM 3.0svn and Clang 2.1. The current versions are LLVM 3.0 and Clang 3.0.

From the Xcode web site, it seems that the latest version (4.2.1) still uses LLVM 2.0, and this seems to be a mistake.

If installing the latest Xcode, will I get a more recent version of LLVM/Clang?

Are there any possible issues installing Clang manually?

Once installed, will the new Clang be used automatically by all the IDEs I have (e.g., NetBeans)?


Solution

  • Software vendors are traditionally conservative about updating build tools and with good reason. If you want to use the latest publicly-supported versions of build tools supplied and modified by Apple, you should stick to those in the latest version of Xcode for the OS X release you are running.

    There are usually good reasons why Apple has not yet updated to the latest cutting-edge versions of open source components, like serious bugs.

    If you don't need the Apple-supplied modifications and don't mind living on the edge - i.e., no support from Apple and possibly (re-)discovering known problems - and are not planning to ship compiled files to other people's systems, you could install your own versions in, say, /usr/local/bin or by using third-party package managers, like MacPorts http://www.macports.org/ports.php?by=name&substr=clang). You should definitely not try to replace the files at the paths installed by Xcode.

    Is it worth it? Only you can decide that.