After a few hours of building the build fails on a shell script, specifically
/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/Platform/Swift.build/Debug/lib-swift-macosx-x86_64-ScriptingBridge.apinotesc.build/Script-347BB45C0A14435E9A7B25F1.sh if that is of any help.
I suspect the build used the wrong Xcode (I have both 9.4 and 9.3), but I haven't found information on how to specify which one of them to use.
Also, I would like to know if it is possible to clean a build not to clone everything from scratch.
Either 9.3 or 9.4 should be fine right now. build-script and the rest of the tools will check what you have xcode-selected when you first configure a build.
I usually do clean builds by deleting the subdirectory for the specific tool I want to clean. In your case that'd be /swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64.
Wasn't aware of that command, thank you. Just checked – it points to 9.3.
Here are the key points
Assertion failed: (FD >= 0 && "File not yet open!"), function preferred_buffer_size, file
/Volumes/Elements/swift-source/llvm/lib/Support/raw_ostream.cpp, line 666.
Program arguments: /Volumes/Elements/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/Debug/bin/swiftc -apinotes -yaml-to-binary
-o /Volumes/Elements/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/Debug/lib/swift/macosx/x86_64/ScriptingBridge.apinotesc
-target x86_64-apple-macosx /Volumes/Elements/swift-source/swift/apinotes/ScriptingBridge.apinotes
make: *** [/Volumes/Elements/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/Debug/lib/swift/macosx/x86_64/ScriptingBridge.apinotesc] Abort trap: 6
Command /bin/sh failed with exit code 2
I can attach the stack trace if needed as well. I'm not sure what is meant by configuring a build, I simply ran ./build-script --xcode but I guess I should have better ./build-script --debug-swift --xcode
It might be worth noting that during precompilation, I sometimes get Looking for ... – not found
I started all over but ran ./build-script --debug-swift --xcode and everything seems fine. It's now running files from the benchmark folder (I assume they are run by default and can be skipped with --skip-build-benchmarks), so I interrupted.
Most likely my fault of course. I remember accidentally deleting some directory during the build (the get info option is next to move to trash) and then hitting cmd+z. It failed hours after but still.