[swift-dev] Building Swift 2.2.1 on macOS High Sierra (10.13)

Joe Groff jgroff at apple.com
Mon Nov 27 12:27:47 CST 2017

> On Nov 19, 2017, at 5:11 PM, leanne via swift-dev <swift-dev at swift.org> wrote:
> Ah, and one more comment: even after installing Xcode 7.3.1 and its Tools, my attempt to build Swift 2,2,1 failed. I had renamed Xcode 7.3.1, then used `xcode-select --switch` to switch to its correct path. However, I noticed in the build log that the new path wasn't being used.
> Apparently, the script doesn't use `xcrun` to select the correct version of the Tools - it has the path hard-coded to Xcode.app/... As a result, to make it work, I had to rename my current Xcode to somethig else, then rename my copy of Xcode 7.3.1 back to Xcode.app.

You may need to blow away your CMakeCache.txt and re-run CMake from scratch to reconfigure your build directory when changing xcodes. The CMake build system ought to use xcrun to sniff out the system compiler paths, but I believe it only does so during configuration time, and won't pick up changes made after the fact.


More information about the swift-dev mailing list