From 9379ec110653b61c0333658d4763766a6ba4adef Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 28 Jan 2025 23:14:03 +0100 Subject: [PATCH] deps.windows: Fix architecture mismatch when building on ARM64 host --- deps.windows/40-detours.ps1 | 6 ------ utils.pwsh/Setup-Host.ps1 | 9 +-------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/deps.windows/40-detours.ps1 b/deps.windows/40-detours.ps1 index d1230d76d..db50af45c 100644 --- a/deps.windows/40-detours.ps1 +++ b/deps.windows/40-detours.ps1 @@ -40,12 +40,6 @@ function Build { Target = $Target } - if ( $Target -eq 'x86' ) { - $Params += @{ - HostArchitecture = $Target - } - } - Invoke-DevShell @Params } diff --git a/utils.pwsh/Setup-Host.ps1 b/utils.pwsh/Setup-Host.ps1 index e08ad0a8c..ff95b3e7d 100644 --- a/utils.pwsh/Setup-Host.ps1 +++ b/utils.pwsh/Setup-Host.ps1 @@ -35,11 +35,4 @@ function Cleanup { Log-Debug "Running Cleanup actions" } -function Get-HostArchitecture { - $Host64Bit = [System.Environment]::Is64BitOperatingSystem - $HostArchitecture = ('x86', 'x64')[$Host64Bit] - - return $HostArchitecture -} - -$script:HostArchitecture = Get-HostArchitecture +$script:HostArchitecture = ([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture).ToString().ToLower()