Skip to content

Hide internal symbols in amalgamated build #940

Open
@bnoordhuis

Description

@bnoordhuis

Internal APIs from cutils.c and other utility functions should be made static in the amalgamated source to prevent name clashes with the project it is linked to.

Suggested solutions:

  1. use the preprocessor with a JS_INTERNAL storage class for such symbols that would expand to nothing in the regular case and to static in the amalgamated source

  2. add the static keyword on all symbols not explicitly tagged as JS_EXTERN when amalgamating sources

Originally posted by @chqrlie in #936 (comment) with light editing by yours truly

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