diff options
author | Martin Storsjö <martin@martin.st> | 2023-07-07 23:46:58 +0300 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-07-10 20:01:50 -0400 |
commit | 9fd3753f8a582a3e29903f105727047b2ced5729 (patch) | |
tree | d65e831cd62c41bb3cc010e087773dc9d2aca876 | |
parent | 1fef03c0f04e86300bee5ff3f628752d9e27304d (diff) | |
download | meson-9fd3753f8a582a3e29903f105727047b2ced5729.zip meson-9fd3753f8a582a3e29903f105727047b2ced5729.tar.gz meson-9fd3753f8a582a3e29903f105727047b2ced5729.tar.bz2 |
windows: Fix detection of the llvm-rc resource compiler
By default, clang-cl based environments use rc.exe as resource
compiler. However, when cross compiling with clang-cl, one might
want to use llvm-rc instead.
Try to detect llvm-rc based on the output from "$CMD /?".
This requires a very recent llvm-rc; previosly, the output of
"/?" with llvm-rc was very generic and didn't explicitly indicate
that it actually was llvm-rc. This was changed in
https://github.com/llvm/llvm-project/commit/bab6902eba55026a829d232629f99ac276936ef0
which will be included in the upcoming LLVM 17.0.0 release.
Contrary to the other regexes, don't include the preceding parts
of the line in the log printout, as it includes an unhelpful
"OVERVIEW:" prefix.
-rw-r--r-- | mesonbuild/modules/windows.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index 2056c0a..f9c7c57 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -97,6 +97,7 @@ class WindowsModule(ExtensionModule): for (arg, match, rc_type) in [ ('/?', '^.*Microsoft.*Resource Compiler.*$', ResourceCompilerType.rc), + ('/?', 'LLVM Resource Converter.*$', ResourceCompilerType.rc), ('--version', '^.*GNU windres.*$', ResourceCompilerType.windres), ('--version', '^.*Wine Resource Compiler.*$', ResourceCompilerType.wrc), ]: |