aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-07-27 15:03:46 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-07-30 08:06:00 +0000
commit77d3edc936af2f40fb16a3bf8c752967b6a93861 (patch)
tree7a3f10444bc4b0b2ce3464ca30683088d8e7cd89
parent7878d02359115a5f1bd50d56c01823fc3df9575e (diff)
GCC: Only consider absolute paths for the system paths check
There is no reason to pay for the call to canonicalFilePath() if the candidate is not an absolute path. Change-Id: Ief39a72ef8967c1315fe6665e1b2795da168027e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--share/qbs/modules/cpp/gcc.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index 95e3d198c..452d7a4d1 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -341,8 +341,8 @@ function linkerFlags(project, product, inputs, output, linkerPath) {
}
function isNotSystemRunPath(p) {
- return !systemRunPaths.contains(p)
- && !canonicalSystemRunPaths.contains(File.canonicalFilePath(p));
+ return !FileInfo.isAbsolutePath(p) || (!systemRunPaths.contains(p)
+ && !canonicalSystemRunPaths.contains(File.canonicalFilePath(p)));
};
for (i in rpaths) {
if (isNotSystemRunPath(rpaths[i]))