From d35034b21bfdcbdb21853340ff983e908ada101f Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 23 Oct 2018 16:14:40 +0100 Subject: [PATCH] Use 'rc' resource compiler with clang-cl toolchain The LLVM toolchain doesn't come with a Windows resource compiler at the moment. Use 'rc' from the Windows SDK. --- mesonbuild/modules/windows.py | 2 +- run_unittests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index f0d5113f8..4d0f244ed 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -60,7 +60,7 @@ class WindowsModule(ExtensionModule): if not rescomp or not rescomp.found(): comp = self.detect_compiler(state.compilers) - if comp.id == 'msvc': + if comp.id == 'msvc' or comp.id == 'clang-cl': rescomp = ExternalProgram('rc', silent=True) else: rescomp = ExternalProgram('windres', silent=True) diff --git a/run_unittests.py b/run_unittests.py index 84dcd3645..474b87a2b 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3070,7 +3070,7 @@ class WindowsTests(BasePlatformTests): # resource compiler depfile generation is not yet implemented for msvc env = get_fake_env(testdir, self.builddir, self.prefix) - depfile_works = env.detect_c_compiler(False).get_id() != 'msvc' + depfile_works = env.detect_c_compiler(False).get_id() not in ['msvc', 'clang-cl'] self.init(testdir) self.build()