Skip to content

Only link C++ libraries by default when run via em++ or when compiling a C++ file. #11121

Description

@sbc100

if you try to link C++ object files with clang or gcc (as opposed to clang++ or g++) the result is undefined C++ symbols.

We should behave the same. Up until #10998
this was a non-issue since we were doing "on-demand" linking for all libraries.

This risks breaking certain users, so it might not be worth it.

The main upside would be that it would reduce the size of C programs build with MAIN_MODULE=1 .. (and be more consistent with existing toolchains).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions