]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Allow user to specify desired build architecture
authorNicholas Tsirakis <niko.tsirakis@gmail.com>
Fri, 6 Nov 2020 20:48:43 +0000 (15:48 -0500)
committerPaul Durrant <pdurrant@amazon.com>
Tue, 10 Nov 2020 11:04:52 +0000 (11:04 +0000)
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 <tsirakisn@ainfosec.com>
Use [string]::IsNullOrEmpty($Arch)

Signed-off-by: Paul Durrant <paul@xen.org>
build.ps1

index 4c769692998d7e1fa3cd8d96fa6be71d116b1696..77b1c6383c3dfa621bc6c6dc949c16fd2133c0d0 100644 (file)
--- 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