Emit unwinding code for textual LLVM and assembly output on Linux (#2163)

This commit is contained in:
Chris Tate
2026-10-24 20:09:47 -05:00
committed by GitHub
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -809,6 +809,9 @@ async function prepareExecutableInput(
pointerBits: buildPlatform === "wasi" ? 32 : 64,
wasi: buildPlatform === "wasi",
runtimeAbiMarker: outputKind === "obj",
// Textual output shows the code an executable gets; objects keep
// the pending flag, since their link may not add an unwinder.
unwindAbi: buildPlatform === "linux" && outputKind !== "obj",
objectAudit: opts.sanitize === true,
lowRegion: lowRegionTarget(buildPlatform, opts.sanitize === true),
...(opts.sanitize === true ? { wasmBoundsChecks: true } : {}),
+5 -1
View File
@@ -408,7 +408,11 @@ export function prepareNativeExecutable(
pointerBits: toolchain.target.pointerBits,
wasi: toolchain.target.platform === "wasi",
runtimeAbiMarker: outputKind === "obj" || outputKind === "exe",
unwindAbi: outputKind === "exe" && toolchain.target.platform === "linux",
// As for the Node-hosted build: executables and their textual
// LLVM and assembly, not objects.
unwindAbi:
(outputKind === "exe" || outputKind === "llvm" || outputKind === "asm") &&
toolchain.target.platform === "linux",
objectAudit: options.sanitize === true,
lowRegion: lowRegionTarget(toolchain.target.platform, options.sanitize === true),
functionWorkers: emitWorkers(),