Skip to content

Commit 72460c5

Browse files
WebKit ARM64 Builderclaude
andcommitted
Fix PowerShell script hardcoding ARM64 triplet
The script was always using arm64-windows-static even on x64. Now properly uses x64-windows-static for x64 builds and arm64-windows-static for ARM64 builds based on architecture detection. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 80ace39 commit 72460c5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

windows-release.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ $UseVcpkg = $true
149149
$VcpkgRoot = if ($env:VCPKG_ROOT) { $env:VCPKG_ROOT } else { "C:\vcpkg" }
150150

151151
# vcpkg installs packages in the project directory when using manifest mode
152-
$VcpkgInstalled = Join-Path (Get-Location) "vcpkg_installed\arm64-windows-static"
152+
$triplet = if ($isARM64) { "arm64-windows-static" } else { "x64-windows-static" }
153+
$VcpkgInstalled = Join-Path (Get-Location) "vcpkg_installed\$triplet"
153154

154155
# Set up ICU paths based on whether we're using vcpkg or building from source
155156
if ($UseVcpkg) {
@@ -160,18 +161,19 @@ if ($UseVcpkg) {
160161
Write-Host ":: Installing ICU via vcpkg with static CRT"
161162

162163
# Create custom triplet if it doesn't exist
163-
$TripletFile = "arm64-windows-static.cmake"
164+
$TripletFile = if ($isARM64) { "arm64-windows-static.cmake" } else { "x64-windows-static.cmake" }
164165
if (-not (Test-Path $TripletFile)) {
166+
$arch = if ($isARM64) { "arm64" } else { "x64" }
165167
$TripletContent = @"
166-
set(VCPKG_TARGET_ARCHITECTURE arm64)
168+
set(VCPKG_TARGET_ARCHITECTURE $arch)
167169
set(VCPKG_CRT_LINKAGE static)
168170
set(VCPKG_LIBRARY_LINKAGE static)
169171
set(VCPKG_CMAKE_SYSTEM_NAME Windows)
170172
"@
171173
Set-Content -Path $TripletFile -Value $TripletContent
172174
}
173175

174-
& vcpkg install --triplet arm64-windows-static
176+
& vcpkg install --triplet $triplet
175177
if ($LASTEXITCODE -ne 0) { throw "vcpkg install failed with exit code $LASTEXITCODE" }
176178
}
177179

@@ -211,7 +213,7 @@ $CmakeArch = if ($isARM64) { "ARM64" } else { "x64" }
211213
# Set vcpkg toolchain file if using vcpkg
212214
$VcpkgToolchain = if ($UseVcpkg) {
213215
"-DCMAKE_TOOLCHAIN_FILE=$VcpkgRoot/scripts/buildsystems/vcpkg.cmake",
214-
"-DVCPKG_TARGET_TRIPLET=arm64-windows-static",
216+
"-DVCPKG_TARGET_TRIPLET=$triplet",
215217
"-DVCPKG_OVERLAY_TRIPLETS=$VcpkgRoot/triplets/community"
216218
} else { @() }
217219

0 commit comments

Comments
 (0)