Skip to content

Commit 9ecfdcd

Browse files
committed
utils: introduce a ToolchainInfo.plist on Windows
This allows us to add an identifier to the toolchain on Windows similar to the swift.org toolchains generated on macOS. The newly introduced identifiers should help support having parallel installable toolchains.
1 parent 09d122a commit 9ecfdcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/build.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ param(
124124
[string[]] $AndroidSDKs = @(),
125125
[string[]] $WindowsSDKs = @("X64","X86","Arm64"),
126126
[string] $ProductVersion = "0.0.0",
127+
[string] $ToolchainVersion = $(if (${env:TOOLCHAIN_VERSION}) { "${env:TOOLCHAIN_VERSION}" } else { "${env:USERNAME}.development" }),
127128
[string] $PinnedBuild = "",
128129
[string] $PinnedSHA256 = "",
129130
[string] $PinnedVersion = "",
@@ -1533,6 +1534,9 @@ function Build-Compilers() {
15331534
"cmark-gfm_DIR" = "$($Arch.ToolchainInstallRoot)\usr\lib\cmake";
15341535
})
15351536
}
1537+
1538+
Invoke-Program "$(Get-PythonExecutable)" -c "import plistlib; print(str(plistlib.dumps({ 'Identifier': '${ToolchainIdentifier}' }), encoding='utf-8'))" `
1539+
-OutFile "$(Arch.ToolchainInstallRoot)\ToolchainInfo.plist"
15361540
}
15371541

15381542
# Reference: https://github.com/microsoft/mimalloc/tree/dev/bin#minject

0 commit comments

Comments
 (0)