summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppprojectinfogenerator.cpp
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2019-04-25 16:06:39 +0200
committerIvan Donchevskii <yv.ivan@gmail.com>2019-04-30 18:00:17 +0000
commitcc9d246b028c518d1fc01fc8318f0945949040d3 (patch)
treee80a736e079808d48098c773e51befc505855b55 /src/plugins/cpptools/cppprojectinfogenerator.cpp
parenta5148b53638bdc9abe2006c7748936524f2d902c (diff)
downloadqt-creator-cc9d246b028c518d1fc01fc8318f0945949040d3.tar.gz
CompilationDatabase: Asjust the sysroot and target handling
If the sysroot option is found - set it as a kit sysroot (only in CompilationDatabase project where we have a cloned kit which does not affect the other existing kits). In other cases use the backup for the sysroot from the toolchain (can exist for clang toolchains based on mingw). Provide target when searching builtin include paths for clang. Fixes: QTCREATORBUG-22339 Change-Id: Ibe07c2e490ba4f7e0d259e6df698d641dbfd0298 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppprojectinfogenerator.cpp')
-rw-r--r--src/plugins/cpptools/cppprojectinfogenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppprojectinfogenerator.cpp b/src/plugins/cpptools/cppprojectinfogenerator.cpp
index c177c7a7d9..f50f003263 100644
--- a/src/plugins/cpptools/cppprojectinfogenerator.cpp
+++ b/src/plugins/cpptools/cppprojectinfogenerator.cpp
@@ -182,7 +182,9 @@ ProjectPart::Ptr ProjectInfoGenerator::createProjectPart(
// Header paths
if (tcInfo.headerPathsRunner) {
const ProjectExplorer::HeaderPaths builtInHeaderPaths
- = tcInfo.headerPathsRunner(flags.commandLineFlags, tcInfo.sysRootPath);
+ = tcInfo.headerPathsRunner(flags.commandLineFlags,
+ tcInfo.sysRootPath,
+ tcInfo.targetTriple);
ProjectExplorer::HeaderPaths &headerPaths = part->headerPaths;
for (const ProjectExplorer::HeaderPath &header : builtInHeaderPaths) {