From 242a2f5f97be1c6489a6f4112535553e759955c3 Mon Sep 17 00:00:00 2001 From: gerioldman Date: Mon, 9 Oct 2023 22:35:52 +0200 Subject: [PATCH] Correct detection for mypy --- mesonbuild/compilers/detect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 58bdf4ebcfbe..88bb34265ea1 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -633,6 +633,9 @@ def sanitize(p: str) -> str: elif 'MCS' in err: cls = c.TaskingMCSCCompiler lnk = linkers.TaskingMCSLinker + else: + raise EnvironmentException(f'Failed to detect linker for TASKING VX-toolset compiler. Please update your cross file(s).') + tasking_ver_match = re.search(r'v(\d+)\.(\d+)r(\d+) Build (\d+)', err) assert tasking_ver_match is not None, 'for mypy' @@ -641,7 +644,7 @@ def sanitize(p: str) -> str: env.coredata.add_lang_args(cls.language, cls, for_machine, env) ld = env.lookup_binary_entry(for_machine, cls.language + '_ld') - linker = lnk(ld, for_machine, version=tasking_version) + linker = lnk(ld, for_machine, version=tasking_version) # Fix needed here return cls( ccache, compiler, tasking_version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker)