]> xenbits.xensource.com Git - pvdrivers/win/xenvkbd.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:35:06 +0000 (11:35 +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 c66ac056b8dc026871ed1ab468304eb13b8d6079..acd63c7b0f11872ab34e478e6cbfe039d2994026 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