aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorL. E. Segovia <amy@amyspark.me>2023-06-13 19:35:49 -0300
committerDylan Baker <dylan@pnwbakers.com>2023-06-15 11:56:21 -0700
commit6b2427a0310c95d8856600a0c5f05133a61b9e43 (patch)
treede660a7a4c521572deeea8b214c8365db4b65257 /mesonbuild
parent5e2a47e768fefb44ac0e7d7b2d7e2d76807cd219 (diff)
downloadmeson-6b2427a0310c95d8856600a0c5f05133a61b9e43.zip
meson-6b2427a0310c95d8856600a0c5f05133a61b9e43.tar.gz
meson-6b2427a0310c95d8856600a0c5f05133a61b9e43.tar.bz2
windows: Fix windres detection for Microsoft shipped Clang
Clang, clang-cl, and MSVC all rely on RC.EXE to build resource files. Fixes #11845
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/modules/windows.py3
1 files changed, 2 insertions, 1 deletions
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)