emscripten-core / emscripten-core/emscripten

Building with -sMAIN_MODULE vs with -sSTRICT and -l<foo> linkage

Open
#24,436 1 comment 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

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

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.