From 6b2427a0310c95d8856600a0c5f05133a61b9e43 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Tue, 13 Jun 2023 19:35:49 -0300 Subject: windows: Fix windres detection for Microsoft shipped Clang Clang, clang-cl, and MSVC all rely on RC.EXE to build resource files. Fixes #11845 --- mesonbuild/modules/windows.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild') diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index ed1bef1..2056c0a 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -86,7 +86,8 @@ class WindowsModule(ExtensionModule): if not rescomp or not rescomp.found(): comp = self.detect_compiler(state.environment.coredata.compilers[for_machine]) - if comp.id in {'msvc', 'clang-cl', 'intel-cl'}: + if comp.id in {'msvc', 'clang-cl', 'intel-cl'} or (comp.linker and comp.linker.id in {'link', 'lld-link'}): + # Microsoft compilers uses rc irrespective of the frontend rescomp = ExternalProgram('rc', silent=True) else: rescomp = ExternalProgram('windres', silent=True) -- cgit v1.1