aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weickelt <richard@weickelt.de>2021-02-13 23:40:47 +0100
committerRichard Weickelt <richard@weickelt.de>2021-02-14 06:55:15 +0000
commited47bcbd9536c133499c1bcb8e6188dc9cd2b6df (patch)
treeaff9f254c4da572b4b42e45d4a5a30856f2ea09c
parentb458387cf2add62955e09a290be13e56c2c82e70 (diff)
Place isNotSystemRunPath in the correct scope
The function isNotSystemRunPath() was used outside of its definition scope. Although that was valid JavaScript, it was still confusing. Change-Id: I25269ce8356637d00ddc281696ae6828f9345488 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--share/qbs/modules/cpp/gcc.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index 9b6a074d2..2c7d0b128 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -355,11 +355,12 @@ function linkerFlags(project, product, inputs, outputs, primaryOutput, linkerPat
return rpath;
}
+ function isNotSystemRunPath(p) {
+ return !FileInfo.isAbsolutePath(p) || (!systemRunPaths.contains(p)
+ && !canonicalSystemRunPaths.contains(File.canonicalFilePath(p)));
+ };
+
if (!product.qbs.targetOS.contains("windows")) {
- function isNotSystemRunPath(p) {
- return !FileInfo.isAbsolutePath(p) || (!systemRunPaths.contains(p)
- && !canonicalSystemRunPaths.contains(File.canonicalFilePath(p)));
- };
for (i in rpaths) {
if (isNotSystemRunPath(rpaths[i]))
escapableLinkerFlags.push("-rpath", fixupRPath(rpaths[i]));