I really enjoy switching from gcc to LLVM compiler, but do I have to switch manually every time I start a new project, or is there any way to make LLVM the default compiler?
I’m talking about xcode 3.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To accomplish this you will have to modify the project template within the Developer directory.
Navigate to where your templates are (probably something like:
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Once you’re there, you can select the project template you wish to modify, and locate it’s
.xcodeprojfile. You can “show package contents” and inside is aproject.pbxproj. You can modify this file and edit in the build setting to change the default compiler.You’ll have to find each section that relates to the build settings for each configuration (Debug, Release etc.), search for
/* Begin XCBuildConfiguration section */.Then you’ll have to add
GCC_VERSIONas a key andcom.apple.compilers.llvm.clang.1_0as the value (1_0 in this instance is actually LLVM 1.6 according to Xcode. I also assume that the key-nameGCC_VERSIONonly has GCC in it for legacy reasons, this will probably be updated toCOMPILER_VERSIONor something in the future).Save the template and create a new project (You may have to restart Xcode if it was open). The compiler should be set to LLVM now.
However, I don’t recommend you do this as LLVM still isn’t 100% fit for deploying applications to users.