emscripten-core / emscripten-core/emscripten
A way to propagate link-time settings from libraries
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Certain settings - for example, `--bind`, `-s ASYNCIFY`, `-s ASYNCIFY_IMPORTS=[...]` - are important for successful compilation of the final binary, that is, without those the application won't work.
When a library relies on any of those features, currently there is no way it can accept & store those settings as part of its own build. Instead, it must document the list of options the user has to pass at link-time when building their application for a successful build.
This seems like an unfortunate leak of implementation details, especially so for options like `ASYNCIFY_IMPORTS` that require listing names of internal helpers used for an async work.
We should find a way to instead accept those options at compile-time of each library, store them in a custom section of the object files, and then read them back and merge with other options in the linker.
cc @sbc100 @kripken
Contributor guide
Assessment
This issue has not been assessed yet.