-updated tests:

*updated build scripts
 *removed tls variables from code (needed to support WebAssembly)
 *some mmutils tweaks
 *some fixes
 *pthread TLS thread ID implementation
-added Atomic file (reimplementation of atomics templates for emscripten)
-added emscripten support to ecs.std
This commit is contained in:
Mergul 2019-11-25 20:06:16 +00:00
parent 46de0f6adb
commit 946fbf2934
18 changed files with 443 additions and 229 deletions

View file

@ -24,16 +24,16 @@ def compile(sources, output):
for f in files:
ldc_cmd += f + ' '
print ldc_cmd
print(ldc_cmd)
if os.system(ldc_cmd):
exit(0)
print
print()
shared_flags = ''
clean = 0
emc_flags = ''
ldc_flags = ''
ldc_flags = '--d-version=ECSEmscripten '
import_paths = ['source','tests']
build_tests = 0
@ -69,6 +69,8 @@ for arg in sys.argv[1:]:
shared_flags += '-O3 '
ldc_flags += '-release -enable-inlining '
emc_flags += '--llvm-lto 3 -s SIMD=1 '
elif(arg == '-pthread'):
emc_flags += '-s PTHREAD_POOL_SIZE=16 -s USE_PTHREADS=1 '
else:
print('unknown argument: ' + arg)
exit()
@ -84,7 +86,8 @@ emcc_cmd = 'emcc -v ' + shared_flags + emc_flags + '-s ALLOW_MEMORY_GROWTH=1 -s
#-s ALLOW_MEMORY_GROWTH=1
emcc_cmd += 'ecs.bc tests.bc'
#emcc_cmd += 'tests.bc'
print emcc_cmd
print(emcc_cmd)
os.system(emcc_cmd)