sym_convert wasm diet: 31.3->11.05 MB via kiface prune + link-order shims (ysync 0009)
New wasm/cli/sym_convert_stubs.cpp: first-definition-wins overrides (--allow-multiple-definition) severing schematic load/save, the KIFONT factory (drops newstroke + freetype/harfbuzz), and the four UI virtuals whose bodies reference pruned typeinfo/data. New wasm/bindings/sym_convert_embind.cpp: no-op kicadCollabOnSave so the converter stops linking eeschema's embind object (and --bind) that rooted the editor surface from .init_array. build-kicad-target.sh: per-app EMBIND_LINK_FLAG + sym_convert now uses its own embind TU. Bumps kicad (kiface prune, gated). Output byte-identical on the qa corpus. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H58sC87w12FotXEmxrJrQV
This commit is contained in:
parent
1f85e13acf
commit
f8da88472c
4 changed files with 144 additions and 9 deletions
11
wasm/bindings/sym_convert_embind.cpp
Normal file
11
wasm/bindings/sym_convert_embind.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// sym_convert's "embind" object — deliberately embind-free (ysync 0009 size
|
||||
// research, step (a)).
|
||||
//
|
||||
// The eeschema kiface references exactly ONE symbol from the editor's embind
|
||||
// TU: kicadCollabOnSave (files-io.cpp, called from SCH_EDIT_FRAME::SaveEEFile —
|
||||
// a path the headless converter never executes). Linking the real
|
||||
// eeschema_embind.o for that one symbol roots the ENTIRE editor surface from
|
||||
// .init_array (EMSCRIPTEN_BINDINGS takes the address of every bound function:
|
||||
// kicadOpenFile → frames/tools/dialogs, collab bridge, presence → GAL), which
|
||||
// GC cannot remove. This no-op hook satisfies the reference instead.
|
||||
extern "C" void kicadCollabOnSave( const char* /* aPath */ ) {}
|
||||
Loading…
Reference in a new issue