Turning Xcode 3 and Xcode 4 toolchains into versionable packages that can be used side by side
I have a strong dislike for having any part of my buildsystem depend on system installed software. Currently my buildsystem uses system installed xcode toolchain (just uses gcc from /usr/bin/gcc).
This gets开发者_开发技巧 increasingly hard when having multiple development branches in development, where some branches are old, needing xcode3, and some are new, needing xcode4, while not wanting to create an entire new buildfarm for each of those braches.
Is it possible to take everything from a specific Xcode version (compilers, linker, headers, libraries, SDKs) and put them in a folder, and invoke them from there directly, so they can live side by side, and will run on any mac?
How would one go about that?
You can install multiple Xcode version at the same time.
- Installing multiple Xcode versions
For Xcode 4.1, please take a look at this page.
- How to install Xcode 4.1 in the specific folder where you want
And then, you might be able to copy the installed folder into another Mac because Xcode installer installs only files into the specified folder. (The toolchain might depend on the layout of that folder, thus you might need to copy the files into the same folder, I'm not sure.)
There is a problem about Xcode version dependency. Xcode 4.1 works only on Lion. It doesn't work on Snow Leopard. It's only for Xcode IDE and xcodebuild commands. gcc and clang/llvm toolchain of Xcode4.1 might work on Snow Leopard. I have never tried it.
精彩评论