emscripten-core / emscripten-core/emscripten
Building with -sMAIN_MODULE vs with -sSTRICT and -l<foo> linkage
Open
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
When building with `-sSTRICT`, one must explicitly link in e.g. GL and HTML5 JS libraries with `-lGL` and `-lhtml5`. The intent was to avoid accidental pollution of symbols into users's builds if they so need.
When building with `-sMAIN_MODULE` however, it looks like one cannot manually pass `-lGL` or `-lhtml5`, or errors about duplicate symbols will result.
Seen while fixing PR https://github.com/emscripten-core/emscripten/pull/24431#discussion_r2114738526
Contributor guide
Assessment
This issue has not been assessed yet.