diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-19 21:56:00 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-05 19:31:32 +0300 |
commit | f41bdae36861baa8be541af8273adc5b4b94ec48 (patch) | |
tree | 9334ac78c12e5505592dcff7f6f5c32c999ee4fb /mesonbuild/environment.py | |
parent | ddbf60f86da4ece3d407fe3b3e38ff45e34f561e (diff) | |
download | meson-f41bdae36861baa8be541af8273adc5b4b94ec48.zip meson-f41bdae36861baa8be541af8273adc5b4b94ec48.tar.gz meson-f41bdae36861baa8be541af8273adc5b4b94ec48.tar.bz2 |
Add basic Webassembly support via Emscripten.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 0d30adb..cd55ace 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -60,6 +60,8 @@ from .compilers import ( ElbrusCCompiler, ElbrusCPPCompiler, ElbrusFortranCompiler, + EmscriptenCCompiler, + EmscriptenCPPCompiler, IntelCCompiler, IntelCPPCompiler, IntelClCCompiler, @@ -707,6 +709,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:'. |