summaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-06-19 21:56:00 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2019-08-02 22:12:05 +0300
commit9251e3bf2ca607b3d6778c246c708916a29aaa88 (patch)
tree7b6dd0a509d6615e5a06f0529451d507b4685dd0 /mesonbuild/environment.py
parentcba23413c58b2089ad752a358aafa3d06edaea4a (diff)
downloadmeson-wasm.tar.gz
Add basic Webassembly support via Emscripten.wasm
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 6c30fc197..096cd090f 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -60,6 +60,8 @@ from .compilers import (
ElbrusCCompiler,
ElbrusCPPCompiler,
ElbrusFortranCompiler,
+ EmscriptenCCompiler,
+ EmscriptenCPPCompiler,
IntelCCompiler,
IntelCPPCompiler,
IntelClCCompiler,
@@ -716,6 +718,11 @@ class Environment:
cls = GnuCCompiler if lang == 'c' else GnuCPPCompiler
return cls(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines, full_version=full_version)
+ if 'Emscripten' in out:
+ cls = EmscriptenCCompiler if lang == 'c' else EmscriptenCPPCompiler
+ compiler_type = CompilerType.CLANG_EMSCRIPTEN
+ return cls(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, full_version=full_version)
+
if 'armclang' in out:
# The compiler version is not present in the first line of output,
# instead it is present in second line, startswith 'Component:'.