diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index e07d4fcc563..01378ec88e2 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -433,6 +433,13 @@ bool CompilerOptionsBuilder::excludeDefineDirective(const QByteArray &defineDire return true; } + // MinGW 6 supports some fancy asm output flags and uses them in an + // intrinsics header pulled in by windows.h. Clang does not know them. + if (m_projectPart.toolchainType == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID + && defineDirective.startsWith("#define __GCC_ASM_FLAG_OUTPUTS__")) { + return true; + } + return false; }