@@ -572,7 +572,7 @@ if (-not $PinnedBuild) {
572572
573573$PinnedToolchain = [IO.Path ]::GetFileNameWithoutExtension($PinnedBuild )
574574# Use a shorter name in paths to avoid going over the path length limit.
575- $NormalizedToolchainName = $PinnedToolchain -replace ' swift-(.+?)-a -windows10.*' , ' $1'
575+ $ToolchainVersionIdentifier = $PinnedToolchain -replace ' swift-(.+?)-windows10.*' , ' $1'
576576
577577if ($EnableCAS -and ($UseHostToolchain -or ($PinnedVersion -ne " 0.0.0" ))) {
578578 throw " CAS currently requires using a main-branch pinned toolchain."
@@ -1402,7 +1402,7 @@ function Get-Dependencies {
14021402
14031403 # TODO(compnerd) stamp/validate that we need to re-extract
14041404 New-Item - ItemType Directory - ErrorAction Ignore $BinaryCache \toolchains | Out-Null
1405- Extract- Toolchain " $PinnedToolchain .exe" $BinaryCache $NormalizedToolchainName
1405+ Extract- Toolchain " $PinnedToolchain .exe" $BinaryCache $ToolchainVersionIdentifier
14061406 Write-Success " Swift Toolchain $PinnedVersion "
14071407
14081408 if ($Android ) {
@@ -1456,7 +1456,7 @@ function Get-Dependencies {
14561456}
14571457
14581458function Get-PinnedToolchainToolsDir () {
1459- $ToolchainsRoot = [IO.Path ]::Combine(" $BinaryCache \toolchains" , " $NormalizedToolchainName " , " LocalApp" , " Programs" , " Swift" , " Toolchains" )
1459+ $ToolchainsRoot = [IO.Path ]::Combine(" $BinaryCache \toolchains" , " $ToolchainVersionIdentifier " , " LocalApp" , " Programs" , " Swift" , " Toolchains" )
14601460
14611461 # NOTE: Add a workaround for the main snapshots that inadvertently used the
14621462 # wrong version when they were built. This allows use of the nightly snapshot
@@ -1481,13 +1481,13 @@ function Get-PinnedToolchainToolsDir() {
14811481}
14821482
14831483function Get-PinnedToolchainSDK ([OS ] $OS = $BuildPlatform.OS , [string ] $Identifier = $OS.ToString ()) {
1484- return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $NormalizedToolchainName ,
1484+ return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $ToolchainVersionIdentifier ,
14851485 " LocalApp" , " Programs" , " Swift" , " Platforms" , (Get-PinnedToolchainVersion ),
14861486 " $ ( $OS.ToString ()) .platform" , " Developer" , " SDKs" , " $Identifier .sdk" )
14871487}
14881488
14891489function Get-PinnedToolchainRuntime () {
1490- return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $NormalizedToolchainName ,
1490+ return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $ToolchainVersionIdentifier ,
14911491 " LocalApp" , " Programs" , " Swift" , " Runtimes" , (Get-PinnedToolchainVersion ),
14921492 " usr" , " bin" )
14931493}
0 commit comments