Skip to content

Commit 14b180d

Browse files
PatTheMavRytoEX
authored andcommitted
deps.windows: Fix architecture mismatch when building on ARM64 host
1 parent c9f8ada commit 14b180d

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

deps.windows/40-detours.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function Build {
4040
Target = $Target
4141
}
4242

43-
if ( $Target -eq 'x86' ) {
43+
if ( $env:CI -ne $null -and $Target -eq 'x86' ) {
4444
$Params += @{
4545
HostArchitecture = $Target
4646
}

utils.pwsh/Setup-Host.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,4 @@ function Cleanup {
3535
Log-Debug "Running Cleanup actions"
3636
}
3737

38-
function Get-HostArchitecture {
39-
$Host64Bit = [System.Environment]::Is64BitOperatingSystem
40-
$HostArchitecture = ('x86', 'x64')[$Host64Bit]
41-
42-
return $HostArchitecture
43-
}
44-
45-
$script:HostArchitecture = Get-HostArchitecture
38+
$script:HostArchitecture = ([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture).ToString().ToLower()

0 commit comments

Comments
 (0)