Skip to content

Add -s STRICT=1 flag emscripten build #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcbarton
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this PR.

Taken from Emscripten documentation here https://emscripten.org/docs/tools_reference/settings_reference.html

Emscripten ‘strict’ build mode: Drop supporting any deprecated build options. Set the environment variable EMCC_STRICT=1 or pass -sSTRICT to test that a codebase builds nicely in forward compatible manner. Changes enabled by this:

        The C define EMSCRIPTEN is not defined (__EMSCRIPTEN__ always is, and is the correct thing to use).

        STRICT_JS is enabled.

        IGNORE_MISSING_MAIN is disabled.

        AUTO_JS_LIBRARIES is disabled.

        AUTO_NATIVE_LIBRARIES is disabled.

        DEFAULT_TO_CXX is disabled.

        USE_GLFW is set to 0 rather than 2 by default.

        ALLOW_UNIMPLEMENTED_SYSCALLS is disabled.

        INCOMING_MODULE_JS_API is set to empty by default.

Making sure the Emscripten build is done in such a way as to be forward compatible feels like a good feature to have.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

@mcbarton mcbarton requested review from vgvassilev and anutosh491 May 12, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant