From 77ad201c0e732274bc68915dee8d1c785c2aad6c Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 3 Aug 2026 20:06:24 -0700 Subject: [PATCH] [docs] Update emscripten_get_compiler_setting documentation Remove references to `OPT_LEVEL` and `DEBUG_LEVEL` from the documentation for `emscripten_get_compiler_setting`, since internal settings are no longer retained. Also update the documented return type from `int` to `long`. See: #25667 --- site/source/docs/api_reference/emscripten.h.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/site/source/docs/api_reference/emscripten.h.rst b/site/source/docs/api_reference/emscripten.h.rst index 6d12767f249ed..87a680a412647 100644 --- a/site/source/docs/api_reference/emscripten.h.rst +++ b/site/source/docs/api_reference/emscripten.h.rst @@ -1343,9 +1343,8 @@ Functions For values containing anything other than an integer, a string is returned (you will need to cast the ``long`` return value to a ``char*``). - Some useful things this can do is provide the version of Emscripten - (“EMSCRIPTEN_VERSION”), the optimization level (“OPT_LEVEL”), debug level - (“DEBUG_LEVEL”), etc. + In addition to normal compiler settings (such as ``INITIAL_MEMORY`` or + ``ASSERTIONS``), ``EMSCRIPTEN_VERSION`` can also be retrieved as a string. For this command to work, you must build with the following compiler option (as we do not want to increase the build size with this metadata): :: @@ -1354,8 +1353,8 @@ Functions :param name: The compiler setting to return. :type name: const char* - :returns: The value of the specified setting. Note that for values other than an integer, a string is returned (cast the ``int`` return value to a ``char*``). - :rtype: int + :returns: The value of the specified setting. Note that for values other than an integer, a string is returned (cast the ``long`` return value to a ``char*``). + :rtype: long .. c:function:: int emscripten_has_asyncify()