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=6af2a3760beed050d5a1387bd81e711b327fce4b;p=pvdrivers%2Fwin%2Fxennet.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 d1980a4..c4858af 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