Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode: How to specify clang version using GCC_VERSION field?

I'm running Xcode4.5. Our project started with older Xcode and specifies compiler version using a meta-file that says

GCC_VERSION = com.apple.compilers.llvm.clang.1_0

As far as I know this points to older version of LLVM and I wonder where I can find the canonical version number that specifies the latest LLVM (4.1) with Xcode4.5?

Thanks!

like image 791
kakyo Avatar asked Oct 16 '25 17:10

kakyo


1 Answers

As far as I know this points to older version of LLVM and I wonder where I can find the canonical version number that specifies the latest LLVM (4.1) with Xcode4.5?

Actually, GCC_VERSION = com.apple.compilers.llvm.clang.1_0 points to the clang toolset referred by Xcode's "Locations".

So just specify the toolset in "Xcode > Preferences > Locations > Locations (Tab) > Command Line Tools" and then use GCC_VERSION = com.apple.compilers.llvm.clang.1_0 to specify clang as the compiler. The toolset you specify in Preferences then defines the version/build of clang you are using.

like image 91
justin Avatar answered Oct 18 '25 12:10

justin