Mono/C#: WebAssembly support
This commit is contained in:
@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user