diff options
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r-- | src/plugins/cpptools/compileroptionsbuilder.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index 109613d2c0..7fde0b3a57 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -792,6 +792,15 @@ void CompilerOptionsBuilder::evaluateCompilerFlags() containsDriverMode = true; } + // Transfrom the "/" starting commands into "-" commands, which if + // unknown will not cause clang to fail because it thinks + // it's a missing file. + if (theOption.startsWith("/") && + (toolChain == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID || + toolChain == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID)) { + theOption[0] = '-'; + } + m_compilerFlags.flags.append(theOption); } |