On my version of Mac OSX (Lion 10.7.1, 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.
Do you know if installing the latest XCode I will get a more recent version of LLVM/Clang?
Do you know of any possible issues installing Clang manually?
Once installed, will the new Clang be used automatically by all the IDEs I have (e.g. NetBeans)?
Select the Configuration Properties > General property page. Modify the Platform Toolset property to LLVM (clang-cl), if it isn't already set. Select the Configuration Properties > Advanced property page. Modify the LLVM Toolset Version property to your preferred version, and then choose OK to save your changes.
Latest LLVM Release! 24 June 2022: LLVM 14.0. 6 is now available for download!
Enter the command clang --version to see if the Clang compilers are already installed. If you want to install or update the Clang compilers, enter the command command xcode-select --install The following pop-up windout should appear on your screen (in this example I have placed it withing the Terminal window).
The web site is incorrect. Xcode 4.2.1 and 4.2 include LLVM 3.0 and clang 3.0:
clang --version
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)clang++ --version
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)llvm-g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)llvm-gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With