Skip to content

Commit

Permalink
Prefer/encourage the simpler list form in settings documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lvlte committed Feb 26, 2025
1 parent 511b12a commit d2c0aae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
24 changes: 14 additions & 10 deletions docs/emcc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,20 @@ Options that are modified or new in *emcc* are listed below:
"-gsource-map[=inline]"
[link] Generate a source map using LLVM debug information (which
must be present in object files, i.e., they should have been
compiled with "-g"). When this option is provided, the **.wasm**
file is updated to have a "sourceMappingURL" section. The resulting
URL will have format: "<base-url>" + "<wasm-file-name>" + ".map".
"<base-url>" defaults to being empty (which means the source map is
served from the same directory as the Wasm file). It can be changed
using --source-map-base. It is possbile to apply path substitutions
to the referenced sources using the "-sSOURCE_MAP_PREFIXES" option.
If "inline" is specified, the sources content is embedded in the
source map (in this case you don't need path substitution, but it
comes with the cost of having a large source map file).
compiled with "-g").

When this option is provided, the **.wasm** file is updated to have
a "sourceMappingURL" section. The resulting URL will have format:
"<base-url>" + "<wasm-file-name>" + ".map". "<base-url>" defaults
to being empty (which means the source map is served from the same
directory as the Wasm file). It can be changed using --source-map-
base.

Path substitution can be applied to the referenced sources using
the "-sSOURCE_MAP_PREFIXES" (link). If "inline" is specified, the
sources content is embedded in the source map (in this case you
don't need path substitution, but it comes with the cost of having
a large source map file).

"-g<level>"
[compile+link] Controls the level of debuggability. Each level
Expand Down
2 changes: 1 addition & 1 deletion site/source/docs/tools_reference/settings_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3141,7 +3141,7 @@ Must be used with ``-gsource-map``.

This setting allows to map path prefixes to the proper ones so that the final
(possibly relative) URLs point to the correct locations :
``-sSOURCE_MAP_PREFIXES=['/old/path=/new/path']``
``-sSOURCE_MAP_PREFIXES=/old/path=/new/path``

Default value: []

Expand Down
2 changes: 1 addition & 1 deletion src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ var LOAD_SOURCE_MAP = false;
//
// This setting allows to map path prefixes to the proper ones so that the final
// (possibly relative) URLs point to the correct locations :
// ``-sSOURCE_MAP_PREFIXES=['/old/path=/new/path']``
// ``-sSOURCE_MAP_PREFIXES=/old/path=/new/path``
//
// [link]
var SOURCE_MAP_PREFIXES = [];
Expand Down

0 comments on commit d2c0aae

Please sign in to comment.