Merge branch 'master' into separate-web-and-emscripten

This commit is contained in:
John Kessenich
2019-09-18 01:55:12 -06:00
committed by GitHub
42 changed files with 15836 additions and 1059 deletions

View File

@@ -168,19 +168,19 @@ the web grammar subset (see more about the web subset in the next section).
### Building to WASM for the Web and Node
Use the steps in [Build Steps](#build-steps), which following notes/exceptions:
Use the steps in [Build Steps](#build-steps), with the following notes/exceptions:
* For building the web subset of core glslang:
+ update the grammar: run `m4` with `-DGLSLANG_WEB`, or simply execute
`updateGrammar web` from the glslang subdirectory
+ execute `updateGrammar web` from the glslang subdirectory
(or if using your own scripts, `m4` needs a `-DGLSLANG_WEB` argument)
+ set `-DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF`
+ turn on `-DENABLE_GLSLANG_WEB=ON`
+ optionally, for GLSL compilation error messages, turn on `-DENABLE_GLSLANG_WEB_DEVEL=ON`
* `emsdk` needs to be present in your executable search path, *PATH* for
Bash-like enivironments
+ Instructions located
[here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
+ [Instructions located
here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
* Wrap cmake call: `emcmake cmake`
* To get a 'true' minimized build, make sure to use `brotli` to compress the .js
* To get a fully minimized build, make sure to use `brotli` to compress the .js
and .wasm files
Example: