emscripten-core / emscripten-core/emscripten

A way to propagate link-time settings from libraries

Open
#14,729 27 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.