mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
js: Enable STRICT_JS in Emscripten
This turns on "use strict" in JavaScript, which enforces declaring variables among other things, and may allow better optimisations.
This commit is contained in:
@ -37,7 +37,8 @@ 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 EXPORTED_FUNCTIONS='[${emcc_export_string}]' \
|
-s EXPORTED_FUNCTIONS='[${emcc_export_string}]' \
|
||||||
-s EXTRA_EXPORTED_RUNTIME_METHODS='[cwrap,callMain]'")
|
-s EXTRA_EXPORTED_RUNTIME_METHODS='[cwrap,callMain]' \
|
||||||
|
-s STRICT_JS=1")
|
||||||
if(WASM)
|
if(WASM)
|
||||||
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -s WASM=1")
|
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -s WASM=1")
|
||||||
else()
|
else()
|
||||||
|
Reference in New Issue
Block a user