emscripten-core / emscripten-core/emscripten
Multiple list-like settings should get merged instead of overriding each other
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
While working on .NET stuff, we noticed that currently having multiple `-sEXPORTED_FUNCTIONS` means that whichever is last, wins, which is not great when you want to pass an export file generated by tooling + statically some extra functions that need to be always exported. For example, if you specify:
```
-s EXPORTED_FUNCTIONS=@some.exports -s EXPORTED_FUNCTIONS=_OneMoreExport
```
Then today only `OneMoreExport` will end up exported and file ignored; if you change the order, the opposite happens.
It would be more useful for them to get merged instead. While chatting to @sbc100 about this idea, he suggested that the same should probably apply to other list-like settings too, e.g. `ASYNCIFY_IMPORTS`.
Contributor guide
Assessment
This issue has not been assessed yet.