@@ -188,13 +188,15 @@ param
188
188
[string ] $AndroidNDKVersion = " r27c" ,
189
189
[ValidateRange (1 , 36 )]
190
190
[int ] $AndroidAPILevel = 28 ,
191
+ [string ] $AndroidSDKDefault = " Android" ,
191
192
[string []] $AndroidSDKVersions = @ (" Android" , " AndroidExperimental" ),
192
193
[string []] $AndroidSDKArchitectures = @ (" aarch64" , " armv7" , " i686" , " x86_64" ),
193
194
194
195
# Windows SDK Options
195
196
[switch ] $Windows = $true ,
196
197
[ValidatePattern (" ^\d+\.\d+\.\d+(?:-\w+)?" )]
197
198
[string ] $WinSDKVersion = " " ,
199
+ [string ] $WindowsSDKDefault = " Windows" ,
198
200
[string []] $WindowsSDKVersions = @ (" Windows" , " WindowsExperimental" ),
199
201
[string []] $WindowsSDKArchitectures = @ (" X64" , " X86" , " Arm64" ),
200
202
@@ -291,6 +293,7 @@ $KnownPlatforms = @{
291
293
};
292
294
BinaryDir = " bin64a" ;
293
295
Cache = @ {};
296
+ DefaultSDK = $WindowsSDKDefault ;
294
297
};
295
298
296
299
WindowsX64 = @ {
@@ -304,6 +307,7 @@ $KnownPlatforms = @{
304
307
};
305
308
BinaryDir = " bin64" ;
306
309
Cache = @ {};
310
+ DefaultSDK = $WindowsSDKDefault ;
307
311
};
308
312
309
313
WindowsX86 = @ {
@@ -317,6 +321,7 @@ $KnownPlatforms = @{
317
321
};
318
322
BinaryDir = " bin32" ;
319
323
Cache = @ {};
324
+ DefaultSDK = $WindowsSDKDefault ;
320
325
};
321
326
322
327
AndroidARMv7 = @ {
@@ -330,6 +335,7 @@ $KnownPlatforms = @{
330
335
};
331
336
BinaryDir = " bin32a" ;
332
337
Cache = @ {};
338
+ DefaultSDK = $AndroidSDKDefault ;
333
339
};
334
340
335
341
AndroidARM64 = @ {
@@ -343,6 +349,7 @@ $KnownPlatforms = @{
343
349
};
344
350
BinaryDir = " bin64a" ;
345
351
Cache = @ {};
352
+ DefaultSDK = $AndroidSDKDefault ;
346
353
};
347
354
348
355
AndroidX86 = @ {
@@ -356,6 +363,7 @@ $KnownPlatforms = @{
356
363
};
357
364
BinaryDir = " bin32" ;
358
365
Cache = @ {};
366
+ DefaultSDK = $AndroidSDKDefault ;
359
367
};
360
368
361
369
AndroidX64 = @ {
@@ -369,6 +377,7 @@ $KnownPlatforms = @{
369
377
};
370
378
BinaryDir = " bin64" ;
371
379
Cache = @ {};
380
+ DefaultSDK = $AndroidSDKDefault ;
372
381
};
373
382
}
374
383
@@ -3001,13 +3010,11 @@ function Build-XCTest([Hashtable] $Platform) {
3001
3010
- InstallTo " $ ( [IO.Path ]::Combine((Get-PlatformRoot $Platform.OS ), " Developer" , " Library" , " XCTest-$ProductVersion " , " usr" )) " `
3002
3011
- Platform $Platform `
3003
3012
- UseBuiltCompilers Swift `
3004
- - SwiftSDK (Get-SwiftSDK $Platform.OS ) `
3013
+ - SwiftSDK (Get-SwiftSDK - OS $Platform.OS - Identifier $Platform .DefaultSDK ) `
3005
3014
- Defines @ {
3006
3015
BUILD_SHARED_LIBS = " YES" ;
3007
3016
CMAKE_INSTALL_BINDIR = $Platform.BinaryDir ;
3008
3017
ENABLE_TESTING = " NO" ;
3009
- dispatch_DIR = $ (Get-ProjectCMakeModules $Platform Dispatch);
3010
- Foundation_DIR = $ (Get-ProjectCMakeModules $Platform DynamicFoundation);
3011
3018
XCTest_INSTALL_NESTED_SUBDIR = " YES" ;
3012
3019
}
3013
3020
}
@@ -3029,8 +3036,6 @@ function Test-XCTest {
3029
3036
- Defines @ {
3030
3037
CMAKE_Swift_FLAGS = @ (" -resource-dir" , $SwiftRuntimeDirectory , " -vfsoverlay" , " ${RuntimeBinaryCache} \stdlib\windows-vfs-overlay.yaml" );
3031
3038
ENABLE_TESTING = " YES" ;
3032
- dispatch_DIR = $ (Get-ProjectCMakeModules $BuildPlatform Dispatch);
3033
- Foundation_DIR = $ (Get-ProjectCMakeModules $BuildPlatform DynamicFoundation);
3034
3039
LLVM_DIR = " $ ( Get-ProjectBinaryCache $BuildPlatform LLVM) \lib\cmake\llvm" ;
3035
3040
XCTEST_PATH_TO_FOUNDATION_BUILD = $ (Get-ProjectBinaryCache $BuildPlatform DynamicFoundation);
3036
3041
XCTEST_PATH_TO_LIBDISPATCH_BUILD = $ (Get-ProjectBinaryCache $BuildPlatform Dispatch);
@@ -3111,8 +3116,7 @@ function Build-SDK([Hashtable] $Platform) {
3111
3116
Invoke-BuildStep Build-Runtime $Platform
3112
3117
Invoke-BuildStep Build-Dispatch $Platform
3113
3118
Invoke-BuildStep Build-Foundation $Platform
3114
- Invoke-BuildStep Build-CompilerRuntime $Platform
3115
- Invoke-BuildStep Build-XCTest $Platform
3119
+
3116
3120
Invoke-BuildStep Build-Testing $Platform
3117
3121
}
3118
3122
@@ -4009,6 +4013,10 @@ if (-not $SkipBuild) {
4009
4013
}
4010
4014
}
4011
4015
4016
+ foreach ($Build in $WindowsSDKBuilds ) {
4017
+ Invoke-BuildStep Build-XCTest $Build
4018
+ }
4019
+
4012
4020
Write-PlatformInfoPlist Windows
4013
4021
}
4014
4022
@@ -4062,6 +4070,10 @@ if (-not $SkipBuild) {
4062
4070
}
4063
4071
}
4064
4072
4073
+ foreach ($Build in $AndroidSDKBuilds ) {
4074
+ Invoke-BuildStep Build-XCTest $Build
4075
+ }
4076
+
4065
4077
Write-PlatformInfoPlist Android
4066
4078
4067
4079
# Android swift-inspect only supports 64-bit platforms.
0 commit comments