Windows Subsystem for Linux can run .exe without mono interpreter

Fixes: #8445
pull/8468/head
Xavier Claessens 4 years ago committed by Xavier Claessens
parent b7bcdb7839
commit c8abede403
  1. 2
      mesonbuild/backend/backends.py
  2. 3
      mesonbuild/mesonlib/universal.py

@ -443,7 +443,7 @@ class Backend:
else:
if exe_cmd[0].endswith('.jar'):
exe_cmd = ['java', '-jar'] + exe_cmd
elif exe_cmd[0].endswith('.exe') and not (mesonlib.is_windows() or mesonlib.is_cygwin()):
elif exe_cmd[0].endswith('.exe') and not (mesonlib.is_windows() or mesonlib.is_cygwin() or mesonlib.is_wsl()):
exe_cmd = ['mono'] + exe_cmd
exe_wrapper = None

@ -107,6 +107,7 @@ __all__ = [
'is_qnx',
'is_sunos',
'is_windows',
'is_wsl',
'iter_regexin_iter',
'join_args',
'listify',
@ -597,6 +598,8 @@ def is_windows() -> bool:
platname = platform.system().lower()
return platname == 'windows'
def is_wsl() -> bool:
return is_linux() and 'microsoft' in platform.version().lower()
def is_cygwin() -> bool:
return sys.platform == 'cygwin'

Loading…
Cancel
Save