diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 51ae246cc..4d9283a25 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -214,6 +214,8 @@ class EmscriptenCCompiler(EmscriptenMixin, ClangCCompiler): full_version: T.Optional[str] = None): if not is_cross: raise MesonException('Emscripten compiler can only be used for cross compilation.') + if not version_compare(version, '>=1.39.19'): + raise MesonException('Meson requires Emscripten >= 1.39.19') ClangCCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross, info, exe_wrapper=exe_wrapper, linker=linker, defines=defines, full_version=full_version) diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 7e1cc5432..496d6c107 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -286,6 +286,8 @@ class EmscriptenCPPCompiler(EmscriptenMixin, ClangCPPCompiler): full_version: T.Optional[str] = None): if not is_cross: raise MesonException('Emscripten compiler can only be used for cross compilation.') + if not version_compare(version, '>=1.39.19'): + raise MesonException('Meson requires Emscripten >= 1.39.19') ClangCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross, info, exe_wrapper=exe_wrapper, linker=linker, defines=defines, full_version=full_version)