Skip to content

MAIN_MODULE=3 to Whitelist Exported Functions #7189

Closed
@awtcode

Description

@awtcode

@kripken , one of the reasons why the number of exported functions is large for a main module is because we cannot differentiate between a system module and a user-implemented module. Thus, we end up exporting everything.

Would it make sense to introduce a MAIN_MODULE=3 whereby all functions are hidden by default and only those that are exported explicitly will be exposed? We can always get the list of C++ std functions by building a dummy main module with MAIN_MODULE=1 and add that list to the whitelist. This would be similar to DISABLE_EXCEPTION_CATCHING where we have a mode 2 to specify functions that should have exceptions enabled.

Can you let me have your thoughts on this proposal? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions