Skip to content

Question: -sMAIN_MODULE=1 and -sEXPORTED_FUNCTIONS warning no longer valid? #21838

Closed

Description

@hoodmane

After #21785 was merged, only things with EMSCRIPTEN_KEEPALIVE are exported. This is problematic if we want to export symbols from libraries. It seems to work to put the library symbols that we wish to export into -sEXPORTED_FUNCTIONS= but we get a warning:

em++: warning: EXPORTED_FUNCTIONS is not valid with LINKABLE set (normally due 
to SIDE_MODULE=1/MAIN_MODULE=1) since all functions are exported this mode.  
To export only a subset use SIDE_MODULE=2/MAIN_MODULE=2 [-Wunused-command-line-argument]

Should this warning be removed now?

Activity

  1. sbc100 commented on Apr 26, 2024

    @sbc100
    Collaborator

    Sorry yes, I believe that warning is no longer valid and we should allow -sEXPORTED_FUNCTIONS in this case.

  2. sbc100 commented on Apr 26, 2024

    @sbc100
    Collaborator

    BTW are you referring to symbols in the main module or symbols in the side module?

  3. hoodmane commented on Apr 27, 2024

    @hoodmane
    CollaboratorAuthor

    Symbols in the main module.

  4. added a commit that references this issue on Aug 11, 2026
    abdb6fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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