Skip to content

Commit

Permalink
Fix emscripten C compiler initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi authored and jpakkane committed Oct 15, 2019
1 parent 7685d49 commit bd42cb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions mesonbuild/compilers/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ class AppleClangCCompiler(ClangCCompiler):

class EmscriptenCCompiler(LinkerEnvVarsMixin, BasicLinkerIsCompilerMixin, ClangCCompiler):
def __init__(self, exelist, version, for_machine: MachineChoice,
info: 'MachineInfo', is_cross, exe_wrapper=None, **kwargs):
is_cross: bool, info: 'MachineInfo', exe_wrapper=None, **kwargs):
if not is_cross:
raise MesonException('Emscripten compiler can only be used for cross compilation.')
ClangCCompiler.__init__(self, exelist, version, for_machine,
is_cross, info, exe_wrapper, **kwargs)
ClangCCompiler.__init__(self, exelist=exelist, version=version,
for_machine=for_machine, is_cross=is_cross,
info=info, exe_wrapper=exe_wrapper, **kwargs)
self.id = 'emscripten'

def get_option_link_args(self, options):
Expand Down
7 changes: 4 additions & 3 deletions mesonbuild/compilers/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ class AppleClangCPPCompiler(ClangCPPCompiler):

class EmscriptenCPPCompiler(LinkerEnvVarsMixin, BasicLinkerIsCompilerMixin, ClangCPPCompiler):
def __init__(self, exelist, version, for_machine: MachineChoice,
is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs):
is_cross: bool, info: 'MachineInfo', exe_wrapper=None, **kwargs):
if not is_cross:
raise MesonException('Emscripten compiler can only be used for cross compilation.')
ClangCPPCompiler.__init__(self, exelist, version, for_machine,
is_cross, info, exe_wrapper, **kwargs)
ClangCPPCompiler.__init__(self, exelist=exelist, version=version,
for_machine=for_machine, is_cross=is_cross,
info=info, exe_wrapper=exe_wrapper, **kwargs)
self.id = 'emscripten'

def get_option_compile_args(self, options):
Expand Down

0 comments on commit bd42cb9

Please sign in to comment.