-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:
Mergul 2019-11-19 10:37:34 +01:00
parent cb7609dcaa
commit 5894e76540
26 changed files with 2562 additions and 20 deletions

View file

@ -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 + ' '
@ -56,6 +56,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 == '--build-tests'):
build_tests = 1
elif(arg == '--llvm-lto'):
@ -77,8 +80,9 @@ if build_tests == 0:
compile(['tests'], 'tests.bc')
emcc_cmd = 'emcc -v ' + shared_flags + emc_flags + '-s ALLOW_MEMORY_GROWTH=1 -s MALLOC=dlmalloc -s WASM=1 -o index.html '
emcc_cmd = 'emcc -v ' + shared_flags + emc_flags + '-s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=1024MB -s MALLOC=dlmalloc -s WASM=1 -o index.html '
#-s ALLOW_MEMORY_GROWTH=1
emcc_cmd += 'ecs.bc tests.bc'
print emcc_cmd