Open
Description
Today, it is difficult to have multiple Swift toolchains installed on a machine and use the appropriate one as needed due to a few reasons:
- The user install a toolchain or one component thereof (such as an SDK) under a arbitrary paths
- The toolchain is placed under the
%Path%
environment variable - The
%SDKROOT%
environment variable points to a single SDK.
We would like to migrate to a model where we can enumerate multiple SDKs and toolchains installed on the machine by using registry entries, similar to what the Windows SDK does for its multiple versions. This would allow us to eliminate the %SDKROOT%
environment variable and provide tooling that can select which version of the compiler, or SDK to use.
Specifically:
- The Swift toolchain msi’s should register themselves in the registry under a standard structure, and unregister themselves upon uninstallation.
- The registry structure should allow enumerating
- The Swift versions installed, and for each version:
- The path to the toolchain, including compiler, if available
- The path to the runtime, if applicable
- The SDKs installed, their paths and redistributable paths
- The Swift versions installed, and for each version:
This could look like how the Windows SDK registers its different versions:
A rough draft of a registry structure:
Swift/
0.0.0-c78f10e/
...
6.0.1/
Toolchain
"C:\Users\micro\AppData\Local\Programs\Swift\Toolchains\6.0.1+Asserts"
"C:\Users\micro\AppData\Local\Programs\Swift\Toolchains\6.0.1+NoAsserts"
Runtimes/
x86_64 "C:\Users\micro\AppData\Local\Programs\Swift\Runtimes\0.0.0\usr\bin"
SDKs/
Windows-x86_64 "C:\Users\micro\AppData\Local\Programs\Swift\Platforms\0.0.0\Windows.platform\Developer\SDKs\Windows.sdk"
RuntimeMSM "C:\Users\micro\AppData\Local\Programs\Swift\Redistributables\0.0.0\rtl.amd64.msm"
Windows-arm64 "C:\Users\micro\AppData\Local\Programs\Swift\Platforms\0.0.0\Windows.platform\Developer\SDKs\Windows.sdk"
Metadata
Metadata
Assignees
Labels
No labels