mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Option cleanup
This commit is contained in:
parent
1c3095f6dd
commit
f41cb46922
1 changed files with 5 additions and 4 deletions
|
@ -107,13 +107,14 @@ endif()
|
|||
|
||||
if(LUAU_BUILD_WEB)
|
||||
target_compile_options(Luau.Web PRIVATE ${LUAU_OPTIONS})
|
||||
target_include_directories(Luau.Web PRIVATE extern)
|
||||
target_link_libraries(Luau.Web PRIVATE Luau.Compiler Luau.VM)
|
||||
|
||||
# declare exported functions to emscripten
|
||||
target_link_options(Luau.Web PRIVATE -sEXPORTED_FUNCTIONS=['_executeScript'] -sEXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -fexceptions)
|
||||
target_link_options(Luau.Web PRIVATE -sSINGLE_FILE=1)
|
||||
|
||||
# custom output directory for wasm + js file
|
||||
# set_target_properties(Luau.Repl.CLI PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/assets/luau)
|
||||
# add -fexceptions for emscripten to allow exceptions to be caught in C++
|
||||
target_link_options(Luau.Web PRIVATE -fexceptions)
|
||||
|
||||
# the output is a single .js file with an embedded wasm blob
|
||||
target_link_options(Luau.Web PRIVATE -sSINGLE_FILE=1)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue