From 70276e52fff0442b0acbe1dd6da385bca6651277 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 15 Jun 2026 22:23:40 -0700 Subject: [PATCH 1/5] Windows: bind BlocksRuntime as an SxS runtime Repair BlocksRuntime.dll with the same generated assembly manifest used for the other Windows SDK runtime DLLs. Include BlocksRuntime in the toolchain SxS runtime graph so executables can bind to it by assembly identity instead of relying on a flat runtime DLL next to the tool. --- utils/build.ps1 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index bbe612169bf44..bde191a5606b6 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -4133,6 +4133,7 @@ function Repair-WindowsSDKAssemblyManifests([Hashtable] $Platform, [string] $Run $Targets = New-Object System.Collections.Generic.List[string] foreach ($DLL in @( + "BlocksRuntime", "dispatch", "swiftDispatch", "Foundation", @@ -5431,15 +5432,9 @@ function Stage-WindowsToolchainSxS([Hashtable] $Platform, # Build basename -> direct Swift runtime imports. Keep only edges within # the runtime DLL set; system and CRT DLLs are not part of the SxS graph. - # - # BlocksRuntime stays flat; the Swift runtime DLLs use private SxS. - $NonSxSRuntimeDLLs = New-Object System.Collections.Generic.HashSet[string] - [void]$NonSxSRuntimeDLLs.Add("BlocksRuntime") - $RuntimeBaseNames = @( $RuntimeDLLs | - ForEach-Object { [IO.Path]::GetFileNameWithoutExtension($_.Name) } | - Where-Object { -not $NonSxSRuntimeDLLs.Contains($_) } + ForEach-Object { [IO.Path]::GetFileNameWithoutExtension($_.Name) } ) $RuntimeSet = New-Object System.Collections.Generic.HashSet[string] foreach ($D in $RuntimeBaseNames) { [void]$RuntimeSet.Add($D) } From add4eeffed04e81ede121f2901f990763b6766e2 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 16 Jun 2026 08:51:48 -0700 Subject: [PATCH 2/5] Windows: embed public key token in SxS manifests Add WindowsSxSAssemblyPublicKeyToken as build-time identity metadata for Windows side-by-side assembly manifests. Default it to the placeholder token so local builds do not need access to the signing certificate or catalog signing pipeline. Thread the token through embedded runtime assembly manifests and the dependent assembly references emitted into tool manifests. This keeps assembly definitions and dependency references consistent while leaving code signing as a separate release step. --- utils/build.ps1 | 50 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index bde191a5606b6..17098fc6d62b2 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -49,6 +49,11 @@ tracking. The product version to be used when building the installer. Supports semantic version strings (e.g., "1.0.0"). Default: "0.0.0" +.PARAMETER WindowsSxSAssemblyPublicKeyToken +The public key token to embed in Windows side-by-side assembly manifests. +This is identity metadata only; it does not sign binaries or catalogs. +Default: "0000000000000000" + .PARAMETER ToolchainIdentifier The toolchain version identifier for the toolchain being built. Default: Uses TOOLCHAIN_VERSION environment variable or "$USERNAME.development" @@ -152,6 +157,8 @@ param # Toolchain Version Info [string] $ProductVersion = "0.0.0", + [ValidatePattern("^[A-Fa-f0-9]{16}$")] + [string] $WindowsSxSAssemblyPublicKeyToken = "0000000000000000", [string] $ToolchainIdentifier = $(if ($env:TOOLCHAIN_VERSION) { $env:TOOLCHAIN_VERSION } else { "$env:USERNAME.development" }), # Toolchain Cross-compilation @@ -204,6 +211,7 @@ param $ErrorActionPreference = "Stop" Set-StrictMode -Version 3.0 +$WindowsSxSAssemblyPublicKeyToken = $WindowsSxSAssemblyPublicKeyToken.ToLowerInvariant() # Avoid being run in a "Developer" shell since this script launches its own sub-shells targeting # different architectures, and these variables cause confusion. @@ -1015,6 +1023,7 @@ function ConvertTo-FourPartVersion([string] $Version) { function Set-WindowsAssemblyManifest([string] $ImagePath, [string] $AssemblyVersion, [string] $ProcessorArchitecture, + [string] $PublicKeyToken, [string] $LogPrefix) { if (-not (Test-Path $ImagePath)) { throw "${LogPrefix}: '$ImagePath' does not exist" @@ -1032,8 +1041,12 @@ function Set-WindowsAssemblyManifest([string] $ImagePath, $ManifestXml = @" - + "@ @@ -1054,7 +1067,8 @@ function Set-WindowsAssemblyManifest([string] $ImagePath, function Test-WindowsAssemblyManifestMatchesImage([string] $ManifestPath, [string] $ImagePath, [string] $AssemblyVersion, - [string] $ProcessorArchitecture) { + [string] $ProcessorArchitecture, + [string] $PublicKeyToken) { $Doc = New-Object System.Xml.XmlDocument $Doc.Load($ManifestPath) @@ -1076,6 +1090,7 @@ function Test-WindowsAssemblyManifestMatchesImage([string] $ManifestPath, ($AssemblyIdentity.GetAttribute("name") -eq $AssemblyName) -and ($AssemblyIdentity.GetAttribute("version") -eq $AssemblyVersion) -and ($AssemblyIdentity.GetAttribute("processorArchitecture") -ieq $ProcessorArchitecture) -and + ($AssemblyIdentity.GetAttribute("publicKeyToken") -ieq $PublicKeyToken) -and ($File.GetAttribute("name") -eq $FileName) ) } @@ -1083,6 +1098,7 @@ function Test-WindowsAssemblyManifestMatchesImage([string] $ManifestPath, function Ensure-WindowsAssemblyManifest([string] $ImagePath, [string] $AssemblyVersion, [string] $ProcessorArchitecture, + [string] $PublicKeyToken, [string] $LogPrefix) { if (-not (Test-Path $ImagePath)) { throw "${LogPrefix}: '$ImagePath' does not exist" @@ -1100,7 +1116,8 @@ function Ensure-WindowsAssemblyManifest([string] $ImagePath, -ManifestPath $ExistingManifestPath ` -ImagePath $ImagePath ` -AssemblyVersion $AssemblyVersion ` - -ProcessorArchitecture $ProcessorArchitecture + -ProcessorArchitecture $ProcessorArchitecture ` + -PublicKeyToken $PublicKeyToken } catch { $KeepExistingManifest = $true throw "${LogPrefix}: '$ImagePath' has an unparsable RT_MANIFEST #1 (extracted to '$ExistingManifestPath')" @@ -1123,6 +1140,7 @@ function Ensure-WindowsAssemblyManifest([string] $ImagePath, -ImagePath $ImagePath ` -AssemblyVersion $AssemblyVersion ` -ProcessorArchitecture $ProcessorArchitecture ` + -PublicKeyToken $PublicKeyToken ` -LogPrefix $LogPrefix } finally { if (-not $KeepExistingManifest) { @@ -1133,11 +1151,13 @@ function Ensure-WindowsAssemblyManifest([string] $ImagePath, function New-WindowsManifestDependency([string] $Name, [string] $AssemblyVersion, - [string] $ProcessorArchitecture) { + [string] $ProcessorArchitecture, + [string] $PublicKeyToken) { return [pscustomobject]@{ Name = $Name Version = $AssemblyVersion ProcessorArchitecture = $ProcessorArchitecture + PublicKeyToken = $PublicKeyToken } } @@ -1197,6 +1217,7 @@ function Set-WindowsExecutableManifestDependencies([string] $ToolPath, $AsmId.SetAttribute("name", $Dependency.Name) $AsmId.SetAttribute("version", $Dependency.Version) $AsmId.SetAttribute("processorArchitecture", $Dependency.ProcessorArchitecture) + $AsmId.SetAttribute("publicKeyToken", $Dependency.PublicKeyToken) $AsmId.SetAttribute("language", "*") [void]$DepAsm.AppendChild($AsmId) [void]$Dep.AppendChild($DepAsm) @@ -2997,7 +3018,8 @@ function Set-WindowsSxSToolchainRuntime { [string] $AssemblyName = "swiftToolchainRuntime", # Windows SxS requires the canonical four-part `a.b.c.d` form. [string] $AssemblyVersion = "1.0.0.0", - [Parameter(Mandatory)] [string] $ProcessorArchitecture + [Parameter(Mandatory)] [string] $ProcessorArchitecture, + [string] $PublicKeyToken = $WindowsSxSAssemblyPublicKeyToken ) if (-not (Test-Path $BinaryDir)) { @@ -3046,8 +3068,12 @@ function Set-WindowsSxSToolchainRuntime { $BundleManifest = @" - + $FilesXml "@ @@ -3059,6 +3085,7 @@ $FilesXml Name = $AssemblyName Version = $AssemblyVersion ProcessorArchitecture = $ProcessorArchitecture + PublicKeyToken = $PublicKeyToken } foreach ($Tool in $Tools) { $ToolPath = if ([System.IO.Path]::IsPathRooted($Tool)) { @@ -3177,7 +3204,8 @@ function Set-WindowsSxSToolchainRuntimePerDLL { [Parameter(Mandatory)] [Hashtable] $EXEDependencies, [Parameter(Mandatory)] [string[]] $DLLsToInject, [Parameter(Mandatory)] [string] $AssemblyVersion, - [Parameter(Mandatory)] [string] $ProcessorArchitecture + [Parameter(Mandatory)] [string] $ProcessorArchitecture, + [string] $PublicKeyToken = $WindowsSxSAssemblyPublicKeyToken ) if (-not (Test-Path $BinaryDir)) { @@ -3211,6 +3239,7 @@ function Set-WindowsSxSToolchainRuntimePerDLL { -ImagePath $StagedDLL ` -AssemblyVersion $AssemblyVersion ` -ProcessorArchitecture $ProcessorArchitecture ` + -PublicKeyToken $PublicKeyToken ` -LogPrefix "Set-WindowsSxSToolchainRuntimePerDLL" Assert-WindowsManifestResourcesAreSxSSafe $StagedDLL "Set-WindowsSxSToolchainRuntimePerDLL" $Length = (Get-Item $StagedDLL).Length @@ -3244,7 +3273,7 @@ function Set-WindowsSxSToolchainRuntimePerDLL { $Dependencies = @( foreach ($DLLName in ($DirectRuntimeDeps | Sort-Object)) { - New-WindowsManifestDependency $DLLName $AssemblyVersion $ProcessorArchitecture + New-WindowsManifestDependency $DLLName $AssemblyVersion $ProcessorArchitecture $PublicKeyToken } ) Set-WindowsExecutableManifestDependencies $ToolPath $Dependencies "Set-WindowsSxSToolchainRuntimePerDLL" @@ -4158,6 +4187,7 @@ function Repair-WindowsSDKAssemblyManifests([Hashtable] $Platform, [string] $Run -ImagePath $Path ` -AssemblyVersion (ConvertTo-FourPartVersion $ProductVersion) ` -ProcessorArchitecture $Platform.Architecture.VSName ` + -PublicKeyToken $WindowsSxSAssemblyPublicKeyToken ` -LogPrefix "Repair-WindowsSDKAssemblyManifests" Assert-WindowsManifestResourcesAreSxSSafe $Path "Repair-WindowsSDKAssemblyManifests" } From 2a1f416ccdf23dd3e80c49646e03b18f18da0702 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 17 Jun 2026 09:04:36 -0700 Subject: [PATCH 3/5] Runtimes: adjust the SxS binding resources The resource identifier was being embedded as a string literal rather than the numeric identifier. Include `winuser.h` in the resource file for preprocessing to allow us to get properly generated resources. --- Runtimes/cmake/modules/ResourceEmbedding.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Runtimes/cmake/modules/ResourceEmbedding.cmake b/Runtimes/cmake/modules/ResourceEmbedding.cmake index a45d6a788e4eb..617f7cad6faee 100644 --- a/Runtimes/cmake/modules/ResourceEmbedding.cmake +++ b/Runtimes/cmake/modules/ResourceEmbedding.cmake @@ -77,6 +77,8 @@ function(embed_version_info target) file(CONFIGURE OUTPUT ${_EVI_BINARY_DIR}/${_EVI_NAME}.rc.in CONTENT [[ +#include + 1 VERSIONINFO FILEVERSION @_EVI_VERSION_MAJOR@,@_EVI_VERSION_MINOR@,@_EVI_VERSION_PATCH@,@_EVI_VERSION_TWEAK@ PRODUCTVERSION @_EVI_VERSION_MAJOR@,@_EVI_VERSION_MINOR@,@_EVI_VERSION_PATCH@,@_EVI_VERSION_TWEAK@ @@ -175,6 +177,8 @@ function(embed_manifest target) file(CONFIGURE OUTPUT ${_EM_BINARY_DIR}/${_EM_NAME}.rc.in CONTENT [[ +#include + 1 VERSIONINFO FILEVERSION @_EM_VERSION_MAJOR@,@_EM_VERSION_MINOR@,@_EM_VERSION_PATCH@,@_EM_VERSION_TWEAK@ PRODUCTVERSION @_EM_VERSION_MAJOR@,@_EM_VERSION_MINOR@,@_EM_VERSION_PATCH@,@_EM_VERSION_TWEAK@ From 6db733ae9080e223bf0d4f93f40a85b3517cb2d8 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 17 Jun 2026 09:56:04 -0700 Subject: [PATCH 4/5] Runtimes: permit embedding the public key token Allow embedding the public key identifier into the generated runtime DLLs. This is required for deeper code signing which enables the global native SxS cache. --- Runtimes/cmake/modules/ResourceEmbedding.cmake | 8 ++++++++ utils/build.ps1 | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/Runtimes/cmake/modules/ResourceEmbedding.cmake b/Runtimes/cmake/modules/ResourceEmbedding.cmake index 617f7cad6faee..638fa552d17f1 100644 --- a/Runtimes/cmake/modules/ResourceEmbedding.cmake +++ b/Runtimes/cmake/modules/ResourceEmbedding.cmake @@ -1,3 +1,8 @@ + +if(WIN32) + option(SWIFT_PUBLIC_KEY_TOKEN "Code Signing Identity" "0000000000000000") +endif() + function(generate_plist project_name project_version target) set(PLIST_INFO_PLIST "Info.plist") set(PLIST_INFO_NAME "${project_name}") @@ -157,6 +162,8 @@ function(embed_manifest target) list(GET version_parts 3 _EM_VERSION_TWEAK) set(_EM_VERSION_STRING "${_EM_VERSION_MAJOR}.${_EM_VERSION_MINOR}.${_EM_VERSION_PATCH}.${_EM_VERSION_TWEAK}") + string(TOLOWER "${SWIFT_PUBLIC_KEY_TOKEN}" _EM_PUBLIC_KEY_TOKEN) + # Evaluate variables file(CONFIGURE OUTPUT ${_EM_BINARY_DIR}/${_EM_NAME}-${_EM_VERSION_STRING}.1.manifest.in @@ -165,6 +172,7 @@ function(embed_manifest target) diff --git a/utils/build.ps1 b/utils/build.ps1 index 17098fc6d62b2..b1d9150c1b600 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -4263,6 +4263,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES"; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; dispatch_DIR = (Get-ProjectCMakeModules $Platform ([Project]"${Variant}CDispatch")); @@ -4298,6 +4299,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4323,6 +4325,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4347,6 +4350,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; SwiftOverlay_DIR = "$OverlayBinaryCache\cmake\SwiftOverlay"; @@ -4374,6 +4378,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { # FIXME(#83449): avoid using `SwiftCMakeConfig.h` CMAKE_CXX_FLAGS = @("-I$RuntimeBinaryCache\include"); CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; SwiftOverlay_DIR = "$OverlayBinaryCache\cmake\SwiftOverlay"; @@ -4400,6 +4405,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { # FIXME(#83449): avoid using `SwiftCMakeConfig.h` CMAKE_CXX_FLAGS = @("-I$RuntimeBinaryCache\include"); CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; SwiftOverlay_DIR = "$OverlayBinaryCache\cmake\SwiftOverlay"; @@ -4425,6 +4431,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; SwiftOverlay_DIR = "$OverlayBinaryCache\cmake\SwiftOverlay"; @@ -4450,6 +4457,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES"; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; SwiftOverlay_DIR = "$OverlayBinaryCache\cmake\SwiftOverlay"; @@ -4476,6 +4484,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES"; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; SwiftOverlay_DIR = "$OverlayBinaryCache\cmake\SwiftOverlay"; From 03a631c184f486a467dc9cb5ea39585a5fd14920 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 17 Jun 2026 10:43:15 -0700 Subject: [PATCH 5/5] Runtimes: permit overriding the project version When building the runtime, we default to the product version for the assembly version. We now wire the product version throughout the build and use that to embed that into the manifest version as well. This is required to get the right version available for the code signing. --- Runtimes/cmake/modules/ResourceEmbedding.cmake | 5 +++-- utils/build.ps1 | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Runtimes/cmake/modules/ResourceEmbedding.cmake b/Runtimes/cmake/modules/ResourceEmbedding.cmake index 638fa552d17f1..385a8584c9b28 100644 --- a/Runtimes/cmake/modules/ResourceEmbedding.cmake +++ b/Runtimes/cmake/modules/ResourceEmbedding.cmake @@ -1,5 +1,6 @@ if(WIN32) + option(SWIFT_ASSEMBLY_VERSION "Assembly Version" "${PROJECT_VERSION}") option(SWIFT_PUBLIC_KEY_TOKEN "Code Signing Identity" "0000000000000000") endif() @@ -67,7 +68,7 @@ function(embed_version_info target) get_target_property(_EVI_NAME ${target} NAME) # Pad the project version to a four-part `MAJOR.MINOR.PATCH.TWEAK` - string(REGEX MATCHALL "[0-9]+" version_parts "${PROJECT_VERSION}") + string(REGEX MATCHALL "[0-9]+" version_parts "${SWIFT_ASSEMBLY_VERSION}") list(LENGTH version_parts version_part_count) while(version_part_count LESS 4) list(APPEND version_parts "0") @@ -150,7 +151,7 @@ function(embed_manifest target) get_target_property(_EM_NAME ${target} NAME) # Pad the project version to a four-part `MAJOR.MINOR.PATCH.TWEAK` - string(REGEX MATCHALL "[0-9]+" version_parts "${PROJECT_VERSION}") + string(REGEX MATCHALL "[0-9]+" version_parts "${SWIFT_ASSEMBLY_VERSION}") list(LENGTH version_parts version_part_count) while(version_part_count LESS 4) list(APPEND version_parts "0") diff --git a/utils/build.ps1 b/utils/build.ps1 index b1d9150c1b600..4970eedba35b3 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -4263,6 +4263,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES"; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; dispatch_DIR = (Get-ProjectCMakeModules $Platform ([Project]"${Variant}CDispatch")); @@ -4299,6 +4300,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4325,6 +4327,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4350,6 +4353,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4378,6 +4382,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { # FIXME(#83449): avoid using `SwiftCMakeConfig.h` CMAKE_CXX_FLAGS = @("-I$RuntimeBinaryCache\include"); CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4405,6 +4410,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { # FIXME(#83449): avoid using `SwiftCMakeConfig.h` CMAKE_CXX_FLAGS = @("-I$RuntimeBinaryCache\include"); CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4431,6 +4437,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { -Defines ($SDKInstallDefines + @{ BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4457,6 +4464,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES"; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore"; @@ -4484,6 +4492,7 @@ function Build-SDK([Hashtable] $Platform, [Hashtable] $Context) { BUILD_SHARED_LIBS = $BUILD_SHARED_LIBS; CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES"; CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + SWIFT_ASSEMBLY_VERSION = "$ProductVersion"; SWIFT_PUBLIC_KEY_TOKEN = "$WindowsSxSAssemblyPublicKeyToken"; SwiftCore_DIR = "$RuntimeBinaryCache\cmake\SwiftCore";