Support compiling demos in wasm build
This commit is contained in:
parent
d1c48e4c5f
commit
3eb4a40c39
11 changed files with 139 additions and 43 deletions
10
meson.build
10
meson.build
|
|
@ -50,11 +50,17 @@ endif
|
|||
add_global_arguments(args, language : 'd')
|
||||
add_global_link_arguments(link_args, language : 'd')
|
||||
|
||||
if host_machine.cpu_family() == 'wasm32'
|
||||
add_global_arguments('--output-bc', language : 'd') # Adding it in cross files breaks linker detection
|
||||
emcc = find_program('emcc')
|
||||
args_wasm = ['-s', 'FORCE_FILESYSTEM=1','-s', 'USE_PTHREADS=1', '-s', 'USE_SDL=2', '-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'WASM_MEM_MAX=1024MB', '-s', 'MALLOC=dlmalloc', '-s', 'WASM=1']
|
||||
endif
|
||||
|
||||
|
||||
# Dependencies
|
||||
threads_dep = dependency('threads')
|
||||
|
||||
ecs_lib = library('decs',
|
||||
src,
|
||||
ecs_lib = library('decs', src,
|
||||
include_directories : [inc],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue