From: Nicholas Tsirakis Date: Fri, 6 Nov 2020 20:48:43 +0000 (-0500) Subject: Allow user to specify desired build architecture X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=72dac97e11e508a3fef940461a1b09d422a1edd4;p=pvdrivers%2Fwin%2Fxenvbd.git Allow user to specify desired build architecture Often times we only need to build a driver for a single targeted architecture. Continue to build both by default, but allow the user to specify one if desired. Signed-off-by: Nicholas Tsirakis Use [string]::IsNullOrEmpty($Arch) Signed-off-by: Paul Durrant --- diff --git a/build.ps1 b/build.ps1 index c66ac05..acd63c7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,6 +5,7 @@ param( [Parameter(Mandatory = $true)] [string]$Type, + [string]$Arch, [switch]$Sdv ) @@ -82,8 +83,13 @@ Set-Item -Path Env:MAJOR_VERSION -Value '9' Set-Item -Path Env:MINOR_VERSION -Value '1' Set-Item -Path Env:MICRO_VERSION -Value '0' -Build "x86" $Type -Build "x64" $Type +if ([string]::IsNullOrEmpty($Arch) -or $Arch -eq "x86" -or $Arch -eq "Win32") { + Build "x86" $Type +} + +if ([string]::IsNullOrEmpty($Arch) -or $Arch -eq "x64") { + Build "x64" $Type +} if ($Sdv) { SdvBuild