diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-01-05 13:13:49 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-01-12 16:25:30 +0000 |
commit | 35495b4a9afabe5d2e8ad30c76c07066d2954a13 (patch) | |
tree | f285b8da7a1a2f50a43a754d294802e969529d17 /src/lib/corelib/buildgraph/depscanner.cpp | |
parent | 6a2f0d769e810a30db8f096bad80b450df4742c9 (diff) |
Make it configurable whether system headers become dependencies
We spent an inordinate amount of resources on scanning and collecting
system headers, of which there are a lot and which typically do not
change in a relevant way. Make this behavior opt-in.
========== Performance data for Rule Execution ==========
Old instruction count: 4331820265
New instruction count: 2557300533
Relative change: -41 %
Old peak memory usage: 18892592 Bytes
New peak memory usage: 16887880 Bytes
Relative change: -11 %
========== Performance data for Null Build ==========
Old instruction count: 521956733
New instruction count: 443021349
Relative change: -16 %
Old peak memory usage: 12498888 Bytes
New peak memory usage: 11186984 Bytes
Relative change: -11 %
[ChangeLog] Introduced cpp.treatSystemHeadersAsDependencies
Change-Id: Iae9d9ca63852fb38a68e8dd2cc10b512eafe15e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/depscanner.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/depscanner.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/corelib/buildgraph/depscanner.cpp b/src/lib/corelib/buildgraph/depscanner.cpp index 8378f9c7a..ab597da1a 100644 --- a/src/lib/corelib/buildgraph/depscanner.cpp +++ b/src/lib/corelib/buildgraph/depscanner.cpp @@ -72,11 +72,15 @@ static QStringList collectCppIncludePaths(const QVariantMap &modules) if (cpp.isEmpty()) return result; - result - << cpp.value(QLatin1String("includePaths")).toStringList() - << cpp.value(QLatin1String("systemIncludePaths")).toStringList() - << cpp.value(QLatin1String("distributionIncludePaths")).toStringList() - << cpp.value(QLatin1String("compilerIncludePaths")).toStringList(); + result << cpp.value(QLatin1String("includePaths")).toStringList(); + const bool useSystemHeaders + = cpp.value(QLatin1String("treatSystemHeadersAsDependencies")).toBool(); + if (useSystemHeaders) { + result + << cpp.value(QLatin1String("systemIncludePaths")).toStringList() + << cpp.value(QLatin1String("distributionIncludePaths")).toStringList() + << cpp.value(QLatin1String("compilerIncludePaths")).toStringList(); + } result.removeDuplicates(); return result; } |