From 81cb0499a293c0a3ce60ab39249afa078278bdb2 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Mon, 17 Jun 2024 22:24:53 -0700 Subject: [PATCH 1/3] [Windows] Update the Swift compiler to 5.10.1 --- utils/build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index 09cdbb9a4e93e..2256645aa0618 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -150,8 +150,8 @@ if ($null -eq $BuildArchName) { $BuildArchName = $env:PROCESSOR_ARCHITECTURE } if ($PinnedBuild -eq "") { switch ($BuildArchName) { "AMD64" { - $PinnedBuild = "https://download.swift.org/swift-5.10-branch/windows10/swift-5.10-DEVELOPMENT-SNAPSHOT-2024-01-18-a/swift-5.10-DEVELOPMENT-SNAPSHOT-2024-01-18-a-windows10.exe" - $PinnedSHA256 = "006266d8c2a6a9c70e21b9d161ec35c07bcbb8a452b17e145899d814d07a29e7" + $PinnedBuild = "https://download.swift.org/swift-5.10.1-release/windows10/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-windows10.exe" + $PinnedSHA256 = "3027762138ACFA1BBE3050FF6613BBE754332E84C9EFA5C23984646009297286" } "ARM64" { # TODO(hjyamauchi) once we have an arm64 release, fill in PinnedBuild and PinnedSHA256. From 46cc777e707dba6763d3d3d8d55379875f461018 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Mon, 17 Jun 2024 22:55:13 -0700 Subject: [PATCH 2/3] Update the Swift toolchain path to 5.10.1 --- utils/build.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index 2256645aa0618..e89312d400899 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -649,11 +649,11 @@ function Fetch-Dependencies { Write-Output "Extracting $PinnedToolchain ..." New-Item -ItemType Directory -ErrorAction Ignore $BinaryCache\toolchains | Out-Null # The new runtime MSI is built to expand files into the immediate directory. So, setup the installation location. - New-Item -ItemType Directory -ErrorAction Ignore $BinaryCache\toolchains\$PinnedToolchain\LocalApp\Programs\Swift\Runtimes\0.0.0\usr\bin | Out-Null + New-Item -ItemType Directory -ErrorAction Ignore $BinaryCache\toolchains\$PinnedToolchain\LocalApp\Programs\Swift\Runtimes\5.10.1\usr\bin | Out-Null Invoke-Program $BinaryCache\WiX-$WiXVersion\tools\net6.0\any\wix.exe -- burn extract $BinaryCache\$PinnedToolchain.exe -out $BinaryCache\toolchains\ -outba $BinaryCache\toolchains\ Get-ChildItem "$BinaryCache\toolchains\WixAttachedContainer" -Filter "*.msi" | % { $LogFile = [System.IO.Path]::ChangeExtension($_.Name, "log") - $TARGETDIR = if ($_.Name -eq "rtl.msi") { "$BinaryCache\toolchains\$PinnedToolchain\LocalApp\Programs\Swift\Runtimes\0.0.0\usr\bin" } else { "$BinaryCache\toolchains\$PinnedToolchain" } + $TARGETDIR = if ($_.Name -eq "rtl.msi") { "$BinaryCache\toolchains\$PinnedToolchain\LocalApp\Programs\Swift\Runtimes\5.10.1\usr\bin" } else { "$BinaryCache\toolchains\$PinnedToolchain" } Invoke-Program -OutNull msiexec.exe /lvx! $BinaryCache\toolchains\$LogFile /qn /a $BinaryCache\toolchains\WixAttachedContainer\$_ ALLUSERS=0 TARGETDIR=$TARGETDIR } @@ -719,22 +719,22 @@ function Fetch-Dependencies { } function Get-PinnedToolchainTool() { - if (Test-Path "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Toolchains\0.0.0+Asserts\usr\bin") { - return "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Toolchains\0.0.0+Asserts\usr\bin" + if (Test-Path "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Toolchains\5.10.1+Asserts\usr\bin") { + return "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Toolchains\5.10.1+Asserts\usr\bin" } return "$BinaryCache\toolchains\${PinnedToolchain}\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" } function Get-PinnedToolchainSDK() { - if (Test-Path "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Platforms\0.0.0\Windows.platform\Developer\SDKs\Windows.sdk") { - return "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Platforms\0.0.0\Windows.platform\Developer\SDKs\Windows.sdk" + if (Test-Path "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Platforms\5.10.1\Windows.platform\Developer\SDKs\Windows.sdk") { + return "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Platforms\5.10.1\Windows.platform\Developer\SDKs\Windows.sdk" } return "$BinaryCache\toolchains\${PinnedToolchain}\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" } function Get-PinnedToolchainRuntime() { - if (Test-Path "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Runtimes\0.0.0\usr\bin\swiftCore.dll") { - return "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Runtimes\0.0.0\usr\bin" + if (Test-Path "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Runtimes\5.10.1\usr\bin\swiftCore.dll") { + return "$BinaryCache\toolchains\${PinnedToolchain}\LocalApp\Programs\Swift\Runtimes\5.10.1\usr\bin" } return "$BinaryCache\toolchains\${PinnedToolchain}\PFiles64\Swift\runtime-development\usr\bin" } From 5b58cd27e4a1d9f582a632326a0e74e24f4165b0 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Mon, 17 Jun 2024 22:59:31 -0700 Subject: [PATCH 3/3] Use 0.0.0 for Runtime on Swift 5.10.1 installer --- utils/build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index e89312d400899..f476576561ca2 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -649,7 +649,7 @@ function Fetch-Dependencies { Write-Output "Extracting $PinnedToolchain ..." New-Item -ItemType Directory -ErrorAction Ignore $BinaryCache\toolchains | Out-Null # The new runtime MSI is built to expand files into the immediate directory. So, setup the installation location. - New-Item -ItemType Directory -ErrorAction Ignore $BinaryCache\toolchains\$PinnedToolchain\LocalApp\Programs\Swift\Runtimes\5.10.1\usr\bin | Out-Null + New-Item -ItemType Directory -ErrorAction Ignore $BinaryCache\toolchains\$PinnedToolchain\LocalApp\Programs\Swift\Runtimes\0.0.0\usr\bin | Out-Null Invoke-Program $BinaryCache\WiX-$WiXVersion\tools\net6.0\any\wix.exe -- burn extract $BinaryCache\$PinnedToolchain.exe -out $BinaryCache\toolchains\ -outba $BinaryCache\toolchains\ Get-ChildItem "$BinaryCache\toolchains\WixAttachedContainer" -Filter "*.msi" | % { $LogFile = [System.IO.Path]::ChangeExtension($_.Name, "log")