@@ -599,16 +599,17 @@ function Invoke-BuildStep {
599
599
$SplatArgs += $Arg
600
600
$i ++
601
601
} elseif ($Arg -is [string ] -and $Arg.StartsWith (' -' )) {
602
- $paramName = $Arg.TrimStart (' -' )
602
+ $ParamName = $Arg.TrimStart (' -' )
603
603
604
604
# Check if the next argument is a value for this parameter
605
- if ($i -lt $RemainingArgs.Count - 1 -and ($RemainingArgs [$i + 1 ] -isnot [string ] -or ! $RemainingArgs [$i + 1 ].StartsWith(' -' ))) {
605
+ $HasNextArg = ($i -lt $RemainingArgs.Count - 1 )
606
+ if ($HasNextArg -and $RemainingArgs [$i + 1 ] -is [string ] -and ! $RemainingArgs [$i + 1 ].StartsWith(' -' )) {
606
607
# This is a named parameter with a value
607
- $SplatArgs [$paramName ] = $RemainingArgs [$i + 1 ]
608
+ $SplatArgs [$ParamName ] = $RemainingArgs [$i + 1 ]
608
609
$i += 2
609
610
} else {
610
611
# This is a switch parameter (flag)
611
- $SplatArgs [$paramName ] = $true
612
+ $SplatArgs [$ParamName ] = $true
612
613
$i ++
613
614
}
614
615
} else {
@@ -3154,7 +3155,6 @@ function Build-Installer([Hashtable] $Platform) {
3154
3155
BundleFlavor = " offline" ;
3155
3156
ImageRoot = " $ ( Get-InstallDir $Platform ) \" ;
3156
3157
INCLUDE_SWIFT_DOCC = $INCLUDE_SWIFT_DOCC ;
3157
- INCLUDE_NOASSERTS = $IncludeNoAsserts ;
3158
3158
SWIFT_DOCC_BUILD = " $ ( Get-ProjectBinaryCache $HostPlatform DocC) \release" ;
3159
3159
SWIFT_DOCC_RENDER_ARTIFACT_ROOT = " ${SourceCache} \swift-docc-render-artifact" ;
3160
3160
}
@@ -3171,6 +3171,7 @@ function Build-Installer([Hashtable] $Platform) {
3171
3171
$Properties [" Platforms" ] = " `" windows$ ( if ($Android ) { " ;android" }) `" " ;
3172
3172
$Properties [" AndroidArchitectures" ] = " `" $ ( ($AndroidSDKPlatforms | ForEach-Object { $_.Architecture.LLVMName }) -Join " ;" ) `" "
3173
3173
$Properties [" WindowsArchitectures" ] = " `" $ ( ($WindowsSDKPlatforms | ForEach-Object { $_.Architecture.LLVMName }) -Join " ;" ) `" "
3174
+ $Properties [" ToolchainVariants" ] = " `" asserts$ ( if ($IncludeNoAsserts ) { " ;noasserts" }) `" " ;
3174
3175
foreach ($SDKPlatform in $WindowsSDKPlatforms ) {
3175
3176
$Properties [" WindowsRuntime$ ( $SDKPlatform.Architecture.ShortName.ToUpperInvariant ()) " ] = [IO.Path ]::Combine((Get-InstallDir $SDKPlatform ), " Runtimes" , " $ProductVersion " );
3176
3177
}
0 commit comments