From ed47bcbd9536c133499c1bcb8e6188dc9cd2b6df Mon Sep 17 00:00:00 2001 From: Richard Weickelt Date: Sat, 13 Feb 2021 23:40:47 +0100 Subject: 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 --- share/qbs/modules/cpp/gcc.js | 9 +++++---- 1 file 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])); -- cgit v1.2.3