Xcode won't pick up a custom swift toolchain

Cross-posting here from the Apple Developer Forums.

I've built ("utils/build-toolchain toolchain.name") and activated a custom toolchain in Xcode. Build logs confirm that the custom swift compiler is being invoked when using default Xcode configuration. However, it doesn't work with the new (preview) build system. Build logs still show the correct "export TOOLCHAINS=..." line, but then it invokes "swift" binary from "XcodeDefault.xctoolchain".
Curiously, Xcode's new build system does pick up and use official release toolchain from swift.org and a custom one from the "test batch mode" thread. I wonder what makes it so different from mine. Is it code signature?

Thanks for the post @AlexST! Do you mind filing a radar with more details? It would be awesome if you can include things like the exact command you invoked to build the toolchain, the Xcode version and any other detail you think might be relevant.

Alright, the problem was with Version field in the generated Info.plist. Xcode wasn't able to parse "swift-LOCAL-2018-05-17-a" as a valid value. The old build system doesn't seem to care. Copying the value from one of the official toolchains solved the problem.
I guess either Xcode or the toolchain generation script must be updated.