Build from source and create redistributable binaries

I am able to build swift from source as detailed in GitHub - apple/swift: The Swift Programming Language. Build output is in ./build/Ninja-RelWithDebInfoAssert (Linux Debian x86_64). How to create redistributable output - similar to downloadable binaries: https://swift.org/builds/swift-4.1.3-release/ubuntu1610/swift-4.1.3-RELEASE/swift-4.1.3-RELEASE-ubuntu16.10.tar.gz?

You need to use:

./utils/build-toolchain

It will do everything for you to produce that.

I am going to add a little documentation to the main README on how to do that.... 1 sec.

@0x900 What do you think of this improvement to the main README page. Would it have answered all of your questions:

https://github.com/apple/swift/blob/3de33e629a8db75655d03ef6f4f78a5afd7e6c1d/README.md#swift-toolchains

(Keep in mind I haven't commited this PR yet, but I wanted your opinion).

EDIT: I updated the link since I fixed the formatting a little bit.

3 Likes

@Michael_Gottesman, you could also explain how to:

  • add the toolchain to $PATH on macOS and Linux;
  • use the toolchain with xcrun and xcodebuild;
  • delete installed toolchains from within Xcode.

https://swift.org/download/#using-downloads

https://help.apple.com/xcode/mac/#/dev05f62dd59

https://help.apple.com/xcode/mac/#/dev128b6c856

Michael,
Updated README page looks good.
Thank you.

I have to move on from this (schedules, etc.). If you have a patch, I can review.

1 Like