mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
js: set -s ENVIRONMENT=web in Emscripten
Puzzles only runs in Web browsers, so there's no need to include support for Node or (for now at least) running in a Web worker. This removes about 5 kiB of code from the boilerplate JavaScript.
This commit is contained in:
@ -41,6 +41,7 @@ list(TRANSFORM emcc_export_list APPEND \")
|
|||||||
string(JOIN "," emcc_export_string ${emcc_export_list})
|
string(JOIN "," emcc_export_string ${emcc_export_list})
|
||||||
set(CMAKE_C_LINK_FLAGS "\
|
set(CMAKE_C_LINK_FLAGS "\
|
||||||
-s ALLOW_MEMORY_GROWTH=1 \
|
-s ALLOW_MEMORY_GROWTH=1 \
|
||||||
|
-s ENVIRONMENT=web \
|
||||||
-s EXPORTED_FUNCTIONS='[${emcc_export_string}]' \
|
-s EXPORTED_FUNCTIONS='[${emcc_export_string}]' \
|
||||||
-s EXPORTED_RUNTIME_METHODS='[cwrap]' \
|
-s EXPORTED_RUNTIME_METHODS='[cwrap]' \
|
||||||
-s STRICT_JS=1")
|
-s STRICT_JS=1")
|
||||||
|
Reference in New Issue
Block a user