fix(wasm): preserve debug module names in WABT output (#1967)

* fix(wasm): preserve debug module names in WABT output

* fix(native): accept otool dylib-use options

Preserve modern dylib options while requiring one encoding metadata row and retaining duplicate and multiline-output checks. Share field parsing between preservation and validation.

Verify delayed dylibs through real macOS CLI/MCP workflows and refresh the high-address golden with the provider's -h -l capture. Validated 85 focused native tests, npm run check, and verify:macos-bundle on macOS arm64.

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
Arthas
2026-10-12 05:44:15 +08:00
committed by GitHub
co-authored by morluto
parent 1d4c4eb030
commit b777e5d4d8
13 changed files with 262 additions and 56 deletions
+3 -3
View File
@@ -323,9 +323,8 @@ export class WabtArtifactProvider implements WasmArtifactPort {
OPERATION,
"Unexpected WABT decoding output.",
);
const { imports, exports, customSectionNames } = parseWabtWat(
wat.stdout.text,
);
const { imports, exports, customSectionNames, debugModuleNames } =
parseWabtWat(wat.stdout.text);
capturedOutput = {
stdout: dump.stdout.text,
stderr: dump.stderr.text,
@@ -335,6 +334,7 @@ export class WabtArtifactProvider implements WasmArtifactPort {
dump.stdout.text,
artifact.bytes,
customSectionNames,
debugModuleNames,
);
const limitations = [
"WAT is a decoded representation, not original source or proof of runtime behavior. Custom annotations may retain payloads, but WAT does not establish original binary layout or round-trip byte identity. Original bytes and objdump output remain authoritative.",