diff --git a/site/build/text/docs/tools_reference/emcc.txt b/site/build/text/docs/tools_reference/emcc.txt index d63ebc3a3..af4954675 100644 --- a/site/build/text/docs/tools_reference/emcc.txt +++ b/site/build/text/docs/tools_reference/emcc.txt @@ -1,3 +1,4 @@ + Emscripten Compiler Frontend (emcc) *********************************** @@ -119,8 +120,14 @@ Options that are modified or new in *emcc* are listed below: * When compiling to object files, this is the same as in *Clang* and *gcc*, it adds debug information to the object files. - * When linking, this is equivalent to -g3 (preserve JS whitespace - and compiled function names). + * When linking, this is equivalent to -g3. + +"-gseparate-dwarf[=FILENAME]" + Preserve debug information, but in a separate file on the side. + This is the same as "-g", but the main file will contain no debug + info, while debug info will be present in a file on the side + ("FILENAME" if provided, otherwise the same as the wasm file but + with suffix ".debug.wasm"). "-g" Controls the level of debuggability. Each level builds on the @@ -133,8 +140,9 @@ Options that are modified or new in *emcc* are listed below: * "-g2": When linking, preserve function names in compiled code. - * "-g3": When compiling to object files, keep debug info (this - is the same as -g). + * "-g3": When compiling to object files, keep debug info, + including JS whitespace, function names, and LLVM debug info + if any (this is the same as -g). * "-g4": When linking, generate a source map using LLVM debug information (which must be present in object files, i.e., they @@ -284,7 +292,21 @@ Options that are modified or new in *emcc* are listed below: "Module" (for example, you can define "Module['print']" there). "--post-js " - Like *--pre-js`*, but emits a file *after* the emitted code. + Like "--pre-js", but emits a file *after* the emitted code. + +"--extern-pre-js " + Specify a file whose contents are prepended to the JavaScript + output. This file is prepended to the final JavaScript output, + *after* all other work has been done, including optimization, + optional "MODULARIZE"-ation, instrumentation like "SAFE_HEAP", etc. + This is the same as prepending this file after "emcc" finishes + running, and is just a convenient way to do that. (For comparison, + "--pre-js" and "--post-js" optimize the code together with + everything else, keep it in the same scope if running *MODULARIZE*, + etc.). + +"--extern-post-js " + Like "--extern-pre-js", but appends to the end. "--embed-file " Specify a file (with path) to embed inside the generated @@ -547,8 +569,9 @@ Options that are modified or new in *emcc* are listed below: * **.bc** : LLVM bitcode. - * **.o** : WebAssembly object file (unless fastcomp or -flto is - used in which case it will be in LLVM bitcode format). + * **.o** : WebAssembly object file (unless fastcomp or + -flto is used in which case it will be in LLVM bitcode + format). * **.wasm** : WebAssembly without JavaScript support code ("standalone wasm"; this enables "STANDALONE_WASM").