Don't sanitize a None path when checking for, but could not find, unsupported cl clones.

pull/13072/head
William D. Jones 11 months ago committed by Dylan Baker
parent 1b9eb6f313
commit 886836a69b
  1. 4
      mesonbuild/compilers/detect.py

@ -287,8 +287,8 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
# practice, Meson will block waiting for Watcom's cl.exe to
# exit, which requires user input and thus will never exit.
if 'WATCOM' in os.environ:
def sanitize(p: str) -> str:
return os.path.normcase(os.path.abspath(p))
def sanitize(p: T.Optional[str]) -> T.Optional[str]:
return os.path.normcase(os.path.abspath(p)) if p else None
watcom_cls = [sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl')),
sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl.exe')),

Loading…
Cancel
Save