diff options
author | Richard Weickelt <richard@weickelt.de> | 2021-02-13 23:40:47 +0100 |
---|---|---|
committer | Richard Weickelt <richard@weickelt.de> | 2021-02-14 06:55:15 +0000 |
commit | ed47bcbd9536c133499c1bcb8e6188dc9cd2b6df (patch) | |
tree | aff9f254c4da572b4b42e45d4a5a30856f2ea09c | |
parent | b458387cf2add62955e09a290be13e56c2c82e70 (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.js | 9 |
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])); |