Skip to content

utils: write SDKSettings for experimental SDKs #81763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,7 @@ function Build-ExperimentalRuntime {
}
}

function Write-SDKSettings([OS] $OS) {
function Write-SDKSettings([OS] $OS, [string] $Identifier = $OS.ToString()) {
$SDKSettings = @{
CanonicalName = $OS.ToString().ToLowerInvariant()
DisplayName = $OS.ToString()
Expand Down Expand Up @@ -2432,8 +2432,8 @@ function Write-SDKSettings([OS] $OS) {
$SDKSettings.SupportedTargets.android.Archs = $AndroidSDKPlatforms | ForEach-Object { $_.Architecture.LLVMName } | Sort-Object
}
}
$SDKSettings | ConvertTo-JSON -Depth 4 | Out-FIle -FilePath "$(Get-SwiftSDK $OS)\SDKSettings.json"
Write-PList -Settings $SDKSettings -Path "$(Get-SwiftSDK $OS)\SDKSettings.plist"
$SDKSettings | ConvertTo-JSON -Depth 4 | Out-FIle -FilePath "$(Get-SwiftSDK $OS -Identifier $Identifier)\SDKSettings.json"
Write-PList -Settings $SDKSettings -Path "$(Get-SwiftSDK $OS -Identifier $Identifier)\SDKSettings.plist"
}

function Build-Dispatch([Hashtable] $Platform) {
Expand Down Expand Up @@ -3337,6 +3337,7 @@ if (-not $SkipBuild) {
Install-Platform $WindowsSDKPlatforms Windows
Write-PlatformInfoPlist Windows
Write-SDKSettings Windows
Write-SDKSettings Windows -Identifier WindowsExperimental

if ($Android) {
foreach ($Platform in $AndroidSDKPlatforms) {
Expand All @@ -3352,6 +3353,7 @@ if (-not $SkipBuild) {
Install-Platform $AndroidSDKPlatforms Android
Write-PlatformInfoPlist Android
Write-SDKSettings Android
Write-SDKSettings Android -Identifier AndroidExperimental

# Android swift-inspect only supports 64-bit platforms.
$AndroidSDKPlatforms | Where-Object { @("arm64-v8a", "x86_64") -contains $_.Architecture.ABI } | ForEach-Object {
Expand Down