Swift compilation failed

I'm hitting the same problem.

  • Xcode 10 beta installed and selected:
$ xcode-select -p
/Applications/Xcode-beta.app/Contents/Developer
$ xcodebuild -version
Xcode 10.0
Build version 10L176w
  • Swift toolchain installed
  • tried utils/build-script, utils/build-script --release-debuginfo, utils/build-script --reconfigure, utils/build-script --clean, all no luck.

Any suggestions?