Reorganize resources/ + wasm target (#1244)
* add README.md to resources directory * add cross/ directory for meson cross files * fix readme list syntax error * fix reflink * disable ASYNCIFY_ADVISE by default * use executable names instead of hardcoding paths
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# cross file for compiling on MacOS ARM (Apple Sillicon).
|
||||
# use this file by running meson setup --cross-file resources/cross/macos_arm64.txt <builddir>
|
||||
|
||||
[host_machine]
|
||||
system = 'darwin'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'arm64'
|
||||
endian = 'little'
|
||||
|
||||
[binaries]
|
||||
c = ['clang']
|
||||
cpp = ['clang++']
|
||||
objc = ['clang']
|
||||
objcpp = ['clang++']
|
||||
ar = ['ar']
|
||||
strip = ['strip']
|
||||
pkgconfig = ['pkg-config']
|
||||
|
||||
[built-in options]
|
||||
c_args = ['-arch', 'arm64']
|
||||
cpp_args = ['-stdlib=libc++', '-arch', 'arm64']
|
||||
objc_args = ['-arch', 'arm64']
|
||||
objcpp_args = ['-stdlib=libc++', '-arch', 'arm64']
|
||||
c_link_args = ['-arch', 'arm64']
|
||||
cpp_link_args = ['-arch', 'arm64']
|
||||
objc_link_args = ['-arch', 'arm64']
|
||||
objcpp_link_args = ['-arch', 'arm64']
|
||||
@@ -0,0 +1,46 @@
|
||||
# cross file for WASM.
|
||||
# use this file by running meson setup --cross-file resources/cross/wasm.txt <builddir>
|
||||
|
||||
[constants]
|
||||
|
||||
# a list of functions that can run without being asyncified; proceed with caution
|
||||
asyncify_ignores = '["SDL_BlitScaled","SDL_UpperBlitScaled","SDL_MapRGB*","SDL_FillRect","SDL_FreeSurface","SDL_CreateRGBSurface","SDL_GetWindowSurface","SDL_PollEvent","SDL_CreateSystemCursor","SDL_SetWindowTitle","SDL_SetCursor","SDL_GetWindowSize","SDL_GetWindowPosition","lua_push*","lua_rawget*","luaL_check*","pcre2*","FT_*","Bezier_*","g_*","FT_*","ft_*","TT_*","tt_*","__*","*printf","gray_*","fopen","fclose","fread","fflush","qsort","sift"]'
|
||||
|
||||
# enable advising for optimizing the list above; disable this to prevent flooding logs
|
||||
asyncify_advise = '0'
|
||||
|
||||
# initial heap size in bytes; make sure it is not too low (around 64mb - 250mb)
|
||||
initial_heap = '104857600'
|
||||
|
||||
|
||||
[binaries]
|
||||
c = 'emcc'
|
||||
cpp = 'em++'
|
||||
ar = 'emar'
|
||||
strip = 'emstrip'
|
||||
cmake = ['emmake', 'cmake']
|
||||
pkg-config = ['emconfigure', 'pkg-config']
|
||||
sdl2-config = ['emconfigure', 'sdl2-config']
|
||||
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
|
||||
|
||||
[built-in options]
|
||||
c_args = []
|
||||
c_link_args = []
|
||||
cpp_args = []
|
||||
cpp_link_args = []
|
||||
|
||||
|
||||
[project options]
|
||||
buildtype = 'release'
|
||||
c_link_args = ['-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'INITIAL_MEMORY=' + initial_heap, '-s', 'ASYNCIFY=1', '-s', 'ASYNCIFY_ADVISE=' + asyncify_advise, '-s', 'ASYNCIFY_STACK_SIZE=6144', '-s', 'ASYNCIFY_REMOVE=' + asyncify_ignores, '-s', 'FORCE_FILESYSTEM=1']
|
||||
|
||||
|
||||
[host_machine]
|
||||
system = 'emscripten'
|
||||
cpu_family = 'wasm32'
|
||||
cpu = 'wasm32'
|
||||
endian = 'little'
|
||||
Reference in New Issue
Block a user