mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 08:25:45 -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 "\
|
||||
-s ALLOW_MEMORY_GROWTH=1 \
|
||||
-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)
|
||||
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -s WASM=1")
|
||||
else()
|
||||
|
Reference in New Issue
Block a user