Skip to content

Commit 9b9345d

Browse files
WebKit ARM64 Builderclaude
andcommitted
Disable asynchronous unwind tables for ARM64 only (both Debug and Release)
ARM64 Windows has issues with SEH (Structured Exception Handling) unwind info that causes clang-cl to crash with "Failed to evaluate function length in SEH unwind info". This fix adds /clang:-fno-asynchronous-unwind-tables flag for ARM64 builds only, keeping it enabled for x64 where it works correctly. Fixes: fatal error: error in backend: Failed to evaluate function length in SEH unwind info 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent d2dc10d commit 9b9345d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

windows-release.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ if ($UseVcpkg -and $ICU_LIBRARIES_FOR_CMAKE) {
287287
$ICUCmakeArgs | ForEach-Object { Write-Host " $_" }
288288
}
289289

290+
# ARM64 needs to disable asynchronous unwind tables to avoid SEH crashes
291+
$UnwindTablesFlag = if ($isARM64) { "/clang:-fno-asynchronous-unwind-tables " } else { "" }
292+
290293
cmake -S . -B $WebKitBuild `
291294
-DPORT="JSCOnly" `
292295
"-DCMAKE_SYSTEM_PROCESSOR=${CmakeArch}" `
@@ -310,10 +313,10 @@ cmake -S . -B $WebKitBuild `
310313
"-DRuby_EXECUTABLE=${RubyPath}" `
311314
"-DCMAKE_C_COMPILER=clang-cl" `
312315
"-DCMAKE_CXX_COMPILER=clang-cl" `
313-
"-DCMAKE_C_FLAGS_RELEASE=/Zi /O2 /Ob2 /DNDEBUG /clang:-fno-asynchronous-unwind-tables " `
314-
"-DCMAKE_CXX_FLAGS_RELEASE=/Zi /O2 /Ob2 /DNDEBUG /clang:-fno-asynchronous-unwind-tables " `
315-
"-DCMAKE_C_FLAGS_DEBUG=/Zi /FS /O0 /Ob0 " `
316-
"-DCMAKE_CXX_FLAGS_DEBUG=/Zi /FS /O0 /Ob0 " `
316+
"-DCMAKE_C_FLAGS_RELEASE=/Zi /O2 /Ob2 /DNDEBUG ${UnwindTablesFlag}" `
317+
"-DCMAKE_CXX_FLAGS_RELEASE=/Zi /O2 /Ob2 /DNDEBUG ${UnwindTablesFlag}" `
318+
"-DCMAKE_C_FLAGS_DEBUG=/Zi /FS /O0 /Ob0 ${UnwindTablesFlag}" `
319+
"-DCMAKE_CXX_FLAGS_DEBUG=/Zi /FS /O0 /Ob0 ${UnwindTablesFlag}" `
317320
-DENABLE_REMOTE_INSPECTOR=ON `
318321
"-DCMAKE_MSVC_RUNTIME_LIBRARY=${CmakeMsvcRuntimeLibrary}" `
319322
@VcpkgToolchain `

0 commit comments

Comments
 (0)