-updated wasm build scripts
-multitheaded wasm tests -updated dub.json -fixed thread pool assert issue -added windows libraries -added demos: *launcher *simple *snake *space invaders (WIP) *statistics window *changable gui styles *tips window *profile window *demo window with automatic generation *multithreaded job updater
This commit is contained in:
parent
cb7609dcaa
commit
5894e76540
26 changed files with 2562 additions and 20 deletions
|
|
@ -13,7 +13,7 @@ def compile(sources, output):
|
|||
if file_extension == '.d' and filename != 'package':
|
||||
files.append(os.path.join(r, file))
|
||||
|
||||
ldc_cmd = 'ldc2 ' + shared_flags + ldc_flags + '-oq -mtriple=wasm32-unknown-unknown-wasm -betterC -L-allow-undefined --output-bc --od=.bc --singleobj --checkaction=C --of=' + output + ' '
|
||||
ldc_cmd = 'ldc2 ' + shared_flags + ldc_flags + '-oq -mtriple=wasm32-unknown-unknown-wasm -betterC --output-bc --od=.bc --singleobj --checkaction=C --of=' + output + ' '
|
||||
|
||||
for path in sources:
|
||||
ldc_cmd += '-I' + path + ' '
|
||||
|
|
@ -58,6 +58,9 @@ for arg in sys.argv[1:]:
|
|||
shared_flags += '-Oz '
|
||||
elif(arg == '-g'):
|
||||
shared_flags += '-g '
|
||||
elif(arg == '-g4'):
|
||||
ldc_flags += '-g '
|
||||
emc_flags += '-g4 '
|
||||
elif(arg == '--llvm-lto'):
|
||||
emc_flags += '--llvm-lto 3 '
|
||||
elif(arg == '--simd'):
|
||||
|
|
@ -68,6 +71,10 @@ for arg in sys.argv[1:]:
|
|||
emc_flags += '--llvm-lto 3 -s SIMD=1 '
|
||||
elif(arg == '--clean'):
|
||||
clean = 1
|
||||
elif(arg == '-pthread'):
|
||||
shared_flags += '-O3 '
|
||||
ldc_flags += '-release -enable-inlining '
|
||||
emc_flags += '-s PTHREAD_POOL_SIZE=16 -Wl,--no-check-features -s USE_PTHREADS=1 '
|
||||
elif(arg == '--demo=simple'):
|
||||
demo = 0
|
||||
else:
|
||||
|
|
@ -83,14 +90,14 @@ compile(['source'], 'demo.bc')
|
|||
if clean or os.path.exists('../ecs.bc') == 0 or os.path.isfile('../ecs.bc') == 0:
|
||||
compile(['../source'], '../ecs.bc')
|
||||
|
||||
emcc_cmd = 'emcc -v ' + shared_flags + emc_flags + '-s ALLOW_MEMORY_GROWTH=1 -s MALLOC=dlmalloc -s FULL_ES2=1 -s WASM=1 -o index.html '
|
||||
emcc_cmd = 'emcc -v ' + shared_flags + emc_flags + '-s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 -s TOTAL_MEMORY=256MB -s WASM_MEM_MAX=1024MB -s MALLOC=dlmalloc -s WASM=1 -o index.html '
|
||||
#-s ALLOW_MEMORY_GROWTH=1 -s PROXY_TO_PTHREAD=1
|
||||
|
||||
emcc_cmd += '../ecs.bc '
|
||||
emcc_cmd += 'utils.bc '
|
||||
emcc_cmd += 'bindbc-sdl.bc '
|
||||
emcc_cmd += 'glad.bc '
|
||||
emcc_cmd += 'cimgui.bc '
|
||||
emcc_cmd += 'nuklear.bc '
|
||||
emcc_cmd += 'mmutils.bc '
|
||||
emcc_cmd += 'demo.bc '
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue