diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-11-10 17:10:38 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-11-13 21:41:11 +0100 |
commit | de7c2ad21b4cc2d889a5aeda64ead962036d2aa4 (patch) | |
tree | 4229e2596bff84d556ec42587918c4b60221b7e1 /modules/mono/config.py | |
parent | 14e52f7aeea449dc6cfa8861657b2e23cc34c560 (diff) | |
download | redot-engine-de7c2ad21b4cc2d889a5aeda64ead962036d2aa4.tar.gz |
Mono/C#: WebAssembly support
Diffstat (limited to 'modules/mono/config.py')
-rw-r--r-- | modules/mono/config.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/mono/config.py b/modules/mono/config.py index 9adf4ee6e5..70cb464c7a 100644 --- a/modules/mono/config.py +++ b/modules/mono/config.py @@ -1,10 +1,11 @@ def can_build(env, platform): - if platform in ['javascript']: - return False # Not yet supported return True def configure(env): + if env['platform'] not in ['windows', 'osx', 'x11', 'server', 'android', 'haiku', 'javascript']: + raise RuntimeError('This module does not currently support building for this platform') + env.use_ptrcall = True env.add_module_version_string('mono') @@ -18,6 +19,13 @@ def configure(env): envvars.Add(BoolVariable('xbuild_fallback', 'If MSBuild is not found, fallback to xbuild', False)) envvars.Update(env) + if env['platform'] == 'javascript': + # Mono wasm already has zlib builtin, so we need this workaround to avoid symbol collisions + print('Compiling with Mono wasm disables \'builtin_zlib\'') + env['builtin_zlib'] = False + thirdparty_zlib_dir = "#thirdparty/zlib/" + env.Prepend(CPPPATH=[thirdparty_zlib_dir]) + def get_doc_classes(): return [ |