Reputation: 4881
With Xcode 4.4 and earlier versions, each SDK used to have either a copy or a symlink to a Clang compiler available at
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/
SDKs/iPhoneOS${IPHONE_SDKVERSION}.sdk/usr/bin/clang++
With Xcode 4.5.2, there is no Clang compiler at the path above. However, I found it at
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
b) Why does it not depend on the SDK version anymore ?
Upvotes: 2
Views: 378
Reputation: 2181
It's because clang can compile for multiple architectures with a single (top-level) binary. The previous gcc-based toolchains needed one gcc per arch.
See how to compile libcurl with arch armv7s under macosx? for examples of passing arch flags to clang.
Also, you can use xcrun to find your tools instead of hardcoding their locations. For example, when cross compiling for iOS:
export CC=`xcrun --sdk iphoneos --find clang`
Upvotes: 2