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
That build failure is unrelated to the
Foundationandlibdispatchchanges - it looks like a failure in the LLVM build. It might be worth updating that component: