@@ -653,16 +653,17 @@ function Invoke-BuildStep {
653
653
$SplatArgs += $Arg
654
654
$i ++
655
655
} elseif ($Arg -is [string ] -and $Arg.StartsWith (' -' )) {
656
- $paramName = $Arg.TrimStart (' -' )
656
+ $ParamName = $Arg.TrimStart (' -' )
657
657
658
658
# Check if the next argument is a value for this parameter
659
- if ($i -lt $RemainingArgs.Count - 1 -and ($RemainingArgs [$i + 1 ] -isnot [string ] -or ! $RemainingArgs [$i + 1 ].StartsWith(' -' ))) {
659
+ $HasNextArg = ($i -lt $RemainingArgs.Count - 1 )
660
+ if ($HasNextArg -and $RemainingArgs [$i + 1 ] -is [string ] -and ! $RemainingArgs [$i + 1 ].StartsWith(' -' )) {
660
661
# This is a named parameter with a value
661
- $SplatArgs [$paramName ] = $RemainingArgs [$i + 1 ]
662
+ $SplatArgs [$ParamName ] = $RemainingArgs [$i + 1 ]
662
663
$i += 2
663
664
} else {
664
665
# This is a switch parameter (flag)
665
- $SplatArgs [$paramName ] = $true
666
+ $SplatArgs [$ParamName ] = $true
666
667
$i ++
667
668
}
668
669
} else {
@@ -3272,7 +3273,6 @@ function Build-Installer([Hashtable] $Platform) {
3272
3273
BundleFlavor = " offline" ;
3273
3274
ImageRoot = " $ ( Get-InstallDir $Platform ) \" ;
3274
3275
INCLUDE_SWIFT_DOCC = $INCLUDE_SWIFT_DOCC ;
3275
- INCLUDE_NOASSERTS = $IncludeNoAsserts ;
3276
3276
SWIFT_DOCC_BUILD = " $ ( Get-ProjectBinaryCache $HostPlatform DocC) \release" ;
3277
3277
SWIFT_DOCC_RENDER_ARTIFACT_ROOT = " ${SourceCache} \swift-docc-render-artifact" ;
3278
3278
}
@@ -3289,6 +3289,7 @@ function Build-Installer([Hashtable] $Platform) {
3289
3289
$Properties [" Platforms" ] = " `" windows$ ( if ($Android ) { " ;android" }) `" " ;
3290
3290
$Properties [" AndroidArchitectures" ] = " `" $ ( ($AndroidSDKPlatforms | ForEach-Object { $_.Architecture.LLVMName }) -Join " ;" ) `" "
3291
3291
$Properties [" WindowsArchitectures" ] = " `" $ ( ($WindowsSDKPlatforms | ForEach-Object { $_.Architecture.LLVMName }) -Join " ;" ) `" "
3292
+ $Properties [" ToolchainVariants" ] = " `" asserts$ ( if ($IncludeNoAsserts ) { " ;noasserts" }) `" " ;
3292
3293
foreach ($SDKPlatform in $WindowsSDKPlatforms ) {
3293
3294
$Properties [" WindowsRuntime$ ( $SDKPlatform.Architecture.ShortName.ToUpperInvariant ()) " ] = [IO.Path ]::Combine((Get-InstallDir $SDKPlatform ), " Runtimes" , " $ProductVersion " );
3294
3295
}
0 commit comments