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/compilers/c.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/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index eff7161..f50b77c 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -119,6 +119,31 @@ class ClangCCompiler(ClangCompiler, CCompiler): return basic +class EmscriptenCCompiler(ClangCCompiler): + def __init__(self, exelist, version, compiler_type, for_machine: MachineChoice, is_cross, exe_wrapper=None, **kwargs): + if not is_cross: + raise MesonException('Emscripten compiler can only be used for cross compilation.') + ClangCCompiler.__init__(self, exelist, version, compiler_type, for_machine, is_cross, exe_wrapper, **kwargs) + self.id = 'emscripten' + + def get_option_link_args(self, options): + return [] + + def get_linker_always_args(self): + return [] + + def get_asneeded_args(self): + return [] + + def get_lundef_args(self): + return [] + + def build_rpath_args(self, *args, **kwargs): + return [] + + def get_soname_args(self, *args, **kwargs): + raise MesonException('Emscripten does not support shared libraries.') + class ArmclangCCompiler(ArmclangCompiler, CCompiler): def __init__(self, exelist, version, compiler_type, for_machine: MachineChoice, is_cross, exe_wrapper=None, **kwargs): CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrapper, **kwargs) |