forked from qt-creator/qt-creator
CompilationDatabase: Fix command line parsing
Handle cased when -x{kind} is one option.
Skip -o output files.
Task-number: QTCREATORBUG-18402
Change-Id: Id8a8612bed2db2b35f17b0968a4ff529e7a66194
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -178,7 +178,7 @@ void addDriverModeFlagIfNeeded(const ToolChain *toolchain, QStringList &flags)
|
||||
if (toolchain->typeId() == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID
|
||||
&& !flags.empty() && !flags.front().endsWith("cl")
|
||||
&& !flags.front().endsWith("cl.exe")) {
|
||||
flags.insert(1, "--driver-mode=g++");
|
||||
flags.prepend("--driver-mode=g++");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user