Support compiling demos in wasm build
This commit is contained in:
parent
d1c48e4c5f
commit
3eb4a40c39
11 changed files with 139 additions and 43 deletions
28
meson_crosscompile_wasm.ini
Normal file
28
meson_crosscompile_wasm.ini
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
; Ex. build:
|
||||
; meson setup b_wasm -DbetterC=true -DBuildDemos=true --cross-file=meson_crosscompile_base.ini --cross-file=meson_crosscompile_wasm.ini
|
||||
; ninja -C b_wasm
|
||||
; emrun --browser chromium-browser ./b_wasm/demos/game.h
|
||||
|
||||
[binaries]
|
||||
emcc = emscripten_path / 'emcc'
|
||||
file_packager = [ 'python3', emscripten_path / 'tools/file_packager.py']
|
||||
c = emscripten_path / 'emcc'
|
||||
cpp = emscripten_path / 'em++'
|
||||
ar = emscripten_path / 'emar'
|
||||
d = ldc_path / 'ldc2'
|
||||
; exe_wrapper = emscripten_path / 'emrun'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
|
||||
[built-in options]
|
||||
d_args = ['-mtriple=wasm32-unknown-unknown-wasm', '--d-version=ECSEmscripten']
|
||||
c_args = ['-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']
|
||||
cpp_args = ['-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']
|
||||
default_library = 'static'
|
||||
|
||||
[host_machine]
|
||||
system = 'Emscripten'
|
||||
cpu_family = 'wasm32'
|
||||
cpu = 'wasm32'
|
||||
endian = 'little'
|
||||
Loading…
Add table
Add a link
Reference in a new issue