Follow the instructions to checkout a full Swift build for Linux:
git clone https://github.com/apple/swift.git
cd swift
./utils/update-checkout --clone
Update the libdispatch component to use the 'experimental/foundation' branch:
cd swift-corelibs-libdispatch
git pull origin experimental/foundation
git submodule init
git submodule update
cd ..
Replace the foundation component with the seabaylea/swift-corelibs-foundation#nsurlsession fork/branch:
rm -rf swift-corelibs-foundation
git clone -b nsurlsession http://github.com/seabaylea/swift-corelibs-foundation
Build a full toolchain, with the addition of the --dispatch
and --install-dispatch
flags. This can be done by updating the swift/utils/build-presets.ini
file to add the flags to the buildbot_linux
:
[preset: buildbot_linux]
mixin-preset=mixin_linux_installation
build-subdir=buildbot_linux
lldb
release
test
validation-test
long-test
libdispatch
foundation
dash-dash
install-libdispatch
install-foundation
reconfigure
and then running the buildbot_linux
preset:
./swift/utils/build-script --preset=buildbot_linux install_destdir=/tmp/install installable_package=/tmp/swift-with-nsurlsession.tar.gz
I had some trouble with :
So I ended up removing
swift-corelibs-libdispatch
and cloning from your branch.I first cloned all the files locally and then
COPY
them into a docker container.My current Dockerfile (docker did not like adding all the files at once, so I split it into multiple phases) :
NSURLSessionDockerfile
Had an error while building Swift but I have since changed my Dockerfile and I am now waiting for it to complete. Will update when it is done.