Skip to content

Commit 5398cc8

Browse files
committed
utils: write SDKSettings for experimental SDKs
Add support to emit the SDKSettings.json for the experimental SDK. This ensures that the we have the settings available for the tools when using this SDK.
1 parent cc2189b commit 5398cc8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

utils/build.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,7 +2396,7 @@ function Build-ExperimentalRuntime {
23962396
}
23972397
}
23982398

2399-
function Write-SDKSettings([OS] $OS) {
2399+
function Write-SDKSettings([OS] $OS, [string] $Identifier = $OS.ToString()) {
24002400
$SDKSettings = @{
24012401
CanonicalName = $OS.ToString().ToLowerInvariant()
24022402
DisplayName = $OS.ToString()
@@ -2432,8 +2432,8 @@ function Write-SDKSettings([OS] $OS) {
24322432
$SDKSettings.SupportedTargets.android.Archs = $AndroidSDKPlatforms | ForEach-Object { $_.Architecture.LLVMName } | Sort-Object
24332433
}
24342434
}
2435-
$SDKSettings | ConvertTo-JSON -Depth 4 | Out-FIle -FilePath "$(Get-SwiftSDK $OS)\SDKSettings.json"
2436-
Write-PList -Settings $SDKSettings -Path "$(Get-SwiftSDK $OS)\SDKSettings.plist"
2435+
$SDKSettings | ConvertTo-JSON -Depth 4 | Out-FIle -FilePath "$(Get-SwiftSDK $OS -Identifier $Identifier)\SDKSettings.json"
2436+
Write-PList -Settings $SDKSettings -Path "$(Get-SwiftSDK $OS -Identifier $Identifier)\SDKSettings.plist"
24372437
}
24382438

24392439
function Build-Dispatch([Hashtable] $Platform) {
@@ -3337,6 +3337,7 @@ if (-not $SkipBuild) {
33373337
Install-Platform $WindowsSDKPlatforms Windows
33383338
Write-PlatformInfoPlist Windows
33393339
Write-SDKSettings Windows
3340+
Write-SDKSettings Windows -Identifier WindowsExperimental
33403341

33413342
if ($Android) {
33423343
foreach ($Platform in $AndroidSDKPlatforms) {
@@ -3352,6 +3353,7 @@ if (-not $SkipBuild) {
33523353
Install-Platform $AndroidSDKPlatforms Android
33533354
Write-PlatformInfoPlist Android
33543355
Write-SDKSettings Android
3356+
Write-SDKSettings Android -Identifier AndroidExperimental
33553357

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

0 commit comments

Comments
 (0)