You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Completely remove REVERSE_DEPS / deps_info using new wasm-ld feature #18875
Today in emscripten we have a reverse dependency system that is made up of two main parts:
Explicitly dependency info in deps_info.py and __deps entries in library files.
Scanning of all inputs using llvm-nm do discover which deps are needed.
With #18849 having been merged we can now move the deps information out of deps_info.py and into the library files.
I was planning on land that next phase, #18865, which enables transitive dependencies, but unfortunately that cause a regression because the current error message produced by wasm-ld was less useful than the jsifier ones:
Current wasm-ld error for missing reverse deps:
wasm-ld: error: symbol exported via --export not found: foo
vs:
error: undefined symbol: bar (referenced by foo__deps: ['bar'], referenced by emscripten_runtime_keepalive_pop__deps: ['foo','$runtimeKeepalivePop'], referenced by top-level compiled C/C++ code)
I think if we can make the wasm-ld message more like this then we could finally switch over to wasm-ld for all symbol resolution:
wasm-ld: error: undefined symbols `foo` required by `bar` which was imported from `libemscripten.txt`
This will require a new wasm-ld input format, which is kind of like a dummy shared library, but is essentially just a text file representing external symbol and their dependencies. My plan is to use a format much like the current current format we use for our cached symbol lists. e.g.:
Activity
sbc100 commentedon Mar 1, 2023
I'm not sure why best to call this text file. We can think of it as a kind of linker script, or a dummy shared library.
sbc100 commentedon Mar 5, 2023
@dschuff pointer out some prior art here in terms of stub objects: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter2-22.html
I used that term in my wasm-ld implementation: https://reviews.llvm.org/D145308
[WIP] Remove deps_info system and and the running of llvm-nm on input…
[lld][WebAssembly] Initial support for stub libraries
[WIP] Remove deps_info system and and the running of llvm-nm on input…
[WIP] Remove deps_info system and and the running of llvm-nm on input…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
14 remaining items
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and and the running of llvm-nm on input file.…
Remove deps_info system and the running of llvm-nm on input file. NFC (…
[lld][WebAssembly] Initial support for stub libraries
[lld][WebAssembly] Initial support for stub libraries
[lld][WebAssembly] Initial support for stub libraries