Variance between downloadable Swift package vs. built from source


I have built Swift v4.2 from source on Ubuntu 16.04 using build instructions given at GitHub - apple/swift: The Swift Programming Language and now working on creation of distributable package. For package reference I checked Ubuntu 16.04 package available at - Download Swift

Though I have not yet checked all the contents of downloaded package, a quick check about "bin" directory contents show that there are a couple of files which appear to be missing from bin directory of built source - swift-build and swift-test. If I build swift package manager explicitly, I can see swift-build gets created under buildbot_incremental/swiftpm-linux-powerpc64le/.bootstrap/bin

So my question is am I missing something while building Swift? or if the distributable tarballs are built manually by accumulating required binaries/libraries/other files at one place and then simply creating a tarball?


build-script has an "install" mode that assembles the build products into a "toolchain" file structure. There's a wrapper around that called build-toolchain that I think is what's used to make the snapshots on (Both of these tools are in the utils/ directory in the "swift" repo.)

Thanks @jrose, I am giving it a try...

Using build-toolchain script helped, although I have run into a coredump, but that's another story.