Windows nightlies built on Azure
Build | Status |
---|---|
Toolchain | x64 VS2017 x64 VS2019 |
Windows SDK | |
Android SDK |
- We assume you are reading these instructions on the Azure DevOps page for windows-swift at https://dev.azure.com/compnerd/windows-swift.
- Choose
Pipelines
>builds
from the left of the dashboard. - Click the most recent successful build.
- At the top right of this page to the right of where it says
All logs
there is a three dot button. Under this chooseArtifacts
>toolchain
to download the nightly toolchain to your machine.
- Extract the toolchain artifact. We assume that the toolchain will be installed to
C:\Library
. Extracting it to that location should give you a hierarchy that looks likeC:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swiftc.exe
. - In order to develop with this toolchain, you will need an installation of the Windows SDK. The easiest way to do this is to install Visual Studio. Additionally, you will need to copy a few files into the SDK to make it usable from swift.
curl -L "https://raw.githubusercontent.com/apple/swift/master/stdlib/public/Platform/ucrt.modulemap" -o "%UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt\module.modulemap"
curl -L "https://raw.githubusercontent.com/apple/swift/master/stdlib/public/Platform/visualc.modulemap" -o "%VCToolsInstallDir%\include\module.modulemap"
curl -L "https://raw.githubusercontent.com/apple/swift/master/stdlib/public/Platform/visualc.apinotes" -o "%VCToolsInstallDir%\include\visualc.apinotes"
curl -L "https://raw.githubusercontent.com/apple/swift/master/stdlib/public/Platform/winsdk.modulemap" -o "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap"
- You will need to add the ICU libraries for the target. The nightlies are built against ICU 63.1 from the ICU project. You can download the binaries for that from http://download.icu-project.org/files/icu4c/63.1/icu4c-63_1-Win64-MSVC2017.zip.
In these instructions we assume you rename the extracted icu folder
icu4c-63_1-Win64-MSVC2017
toicu63_1
and move it toC:\Library
.
- To have the required Visual Studio toolchain available ensure you use the
x64 Native Tools Command Prompt for VS 2017
that came with Visual Studio. Search inside the Visual Studio application folder to find it. - You need to add the folder containing
swiftc.exe
to thePATH
environment variable to use the toolchain. - You also need to add the folder containing the icu dlls to the
PATH
environment variable.
This can be achieved by entering the following into the command line.
path %PATH%;C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin
path %PATH%;C:\Library\icu63_1\bin64
Alternatively, to make these changes persistent go to the Windows environment variables edit dialog found in System Properties
> Advanced
> Environment Variables
and edit the path variable to add the following two new items.
C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin
C:\Library\icu63_1\bin64
Note: After modifying the environment variables using this dialog, running applications must be restarted in order for changes to take effect.