From a62d483ede13a95d269bd35723cea9b60731f39a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 21 Oct 2024 15:28:11 +0200 Subject: [PATCH] ProjectExplorer: Fix toolchain bundling for llvm-mingw Change-Id: I1fd6b59a9192510d9049b7540ae654560a4872fb Reviewed-by: hjk --- src/plugins/projectexplorer/gcctoolchain.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 90c0d81f4d9..831e4aa35d7 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1606,6 +1606,12 @@ std::unique_ptr GccToolchainFactory::createConfigurationW FilePath GccToolchainFactory::correspondingCompilerCommand( const FilePath &srcPath, Id targetLang) const { + // llvm-mingw + if (supportedToolchainType() == Constants::MINGW_TOOLCHAIN_TYPEID + && srcPath.fileName().contains("clang")) { + return GccToolchain::correspondingCompilerCommand(srcPath, targetLang, "clang", "clang++"); + } + if (supportedToolchainType() == Constants::GCC_TOOLCHAIN_TYPEID || supportedToolchainType() == Constants::MINGW_TOOLCHAIN_TYPEID) { return GccToolchain::correspondingCompilerCommand(srcPath, targetLang, "gcc", "g++");