From afdb07f591bfae0e172335ed8e8aa6bdb1dfc881 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 8 Apr 2026 11:38:50 -0700 Subject: [PATCH] Mark `-sDETERMINISIC` as deprecated. See #26647 and #26648 --- ChangeLog.md | 1 + site/source/docs/tools_reference/settings_reference.rst | 3 +++ src/settings.js | 1 + test/test_other.py | 2 +- tools/settings.py | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 15700a09b91e7..a43b714166d62 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -22,6 +22,7 @@ See docs/process.md for more on how version tagging works. ---------------------- - The minimum version of node supported by the generated code was bumped from v12.22.0 to v18.3.0. (#26604) +- The DETERMINISIC settings was marked as deprecated () 5.0.5 - 04/03/26 ---------------- diff --git a/site/source/docs/tools_reference/settings_reference.rst b/site/source/docs/tools_reference/settings_reference.rst index a8de5a33b2acd..b9962d866639c 100644 --- a/site/source/docs/tools_reference/settings_reference.rst +++ b/site/source/docs/tools_reference/settings_reference.rst @@ -1787,6 +1787,8 @@ browser's language setting (which would mean you can get different results in different browsers, or in the browser and in node). Good for comparing builds for debugging purposes (and nothing else). +.. note:: This setting is deprecated + Default value: false .. _modularize: @@ -3421,6 +3423,7 @@ these settings please open a bug (or reply to one of the existing bugs). - ``ASYNCIFY_EXPORTS``: please use JSPI_EXPORTS instead - ``LINKABLE``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262) - ``EXPORT_EXCEPTION_HANDLING_HELPERS``: getExceptionMessage is exported anyway when ASSERTIONS or EXCEPTION_STACK_TRACES is set, which are set by default at -O0. At -O1 or above, you can export it separately by -sEXPORTED_RUNTIME_METHODS=getExceptionMessage,decrementExceptionRefcount. + - ``DETERMINISTIC``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/26647) .. _legacy-settings: diff --git a/src/settings.js b/src/settings.js index fc50d8e0983f5..fdb3a4ad1864e 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1213,6 +1213,7 @@ var SMALL_XHR_CHUNKS = false; // in different browsers, or in the browser and in node). // Good for comparing builds for debugging purposes (and nothing else). // [link] +// [deprecated] var DETERMINISTIC = false; // By default we emit all code in a straightforward way into the output diff --git a/test/test_other.py b/test/test_other.py index 3ac05d902c1ee..e948678f1b4fe 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -12059,7 +12059,7 @@ def test_deterministic(self): printf("JS random: %d\n", EM_ASM_INT({ return Math.random() })); } ''') - self.run_process([EMCC, 'src.c', '-sDETERMINISTIC'] + self.get_cflags()) + self.run_process([EMCC, 'src.c', '-sDETERMINISTIC', '-Wno-deprecated'] + self.get_cflags()) one = self.run_js('a.out.js') # ensure even if the time resolution is 1 second, that if we see the real # time we'll see a difference diff --git a/tools/settings.py b/tools/settings.py index ce511e75eb1d5..b82206bcc9d44 100644 --- a/tools/settings.py +++ b/tools/settings.py @@ -115,6 +115,7 @@ 'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead', 'LINKABLE': 'under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)', 'EXPORT_EXCEPTION_HANDLING_HELPERS': 'getExceptionMessage is exported anyway when ASSERTIONS or EXCEPTION_STACK_TRACES is set, which are set by default at -O0. At -O1 or above, you can export it separately by -sEXPORTED_RUNTIME_METHODS=getExceptionMessage,decrementExceptionRefcount.', + 'DETERMINISTIC': 'under consideration for removal (https://github.com/emscripten-core/emscripten/issues/26647)', } # Settings that don't need to be externalized when serializing to json because they