aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-06-29 10:44:52 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-06-29 10:44:52 +0200
commit5821d32afc9eb44359ce6934d8c6d25afd7088d9 (patch)
treea535076493e87cab9b3c3dce495baa562ebee18a /share
parent07bf66a03e775aeb9f46f46204e6633398b650a5 (diff)
parent872e4b883d7732c46e1e5d32b60ce698862e5da6 (diff)
Merge 1.12 into master
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs7
-rw-r--r--share/qbs/modules/Exporter/qbs/qbsexporter.qbs4
-rw-r--r--share/qbs/modules/cpp/UnixGCC.qbs4
-rw-r--r--share/qbs/modules/cpp/gcc.js11
4 files changed, 18 insertions, 8 deletions
diff --git a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs
index 7037a58cd..8cc55f885 100644
--- a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs
+++ b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs
@@ -31,11 +31,8 @@ Module {
requiresInputs: false
// Make sure all relevant library artifacts have been created by the time we run.
- inputsFromDependencies: autoDetect
- ? ["Exporter.pkgconfig.pc", "staticlibrary", "dynamiclibrary"]
- : []
- inputs: {
- if (!product.Exporter.pkgconfig.autoDetect)
+ auxiliaryInputs: {
+ if (!autoDetect)
return undefined;
if (product.type.contains("staticlibrary"))
return ["staticlibrary"];
diff --git a/share/qbs/modules/Exporter/qbs/qbsexporter.qbs b/share/qbs/modules/Exporter/qbs/qbsexporter.qbs
index 093512c6d..861483ef0 100644
--- a/share/qbs/modules/Exporter/qbs/qbsexporter.qbs
+++ b/share/qbs/modules/Exporter/qbs/qbsexporter.qbs
@@ -48,7 +48,9 @@ Module {
requiresInputs: false
// Make sure we only run when all other artifacts are already present.
- inputs: product.type.filter(function(t) { return t !== "Exporter.qbs.module"; })
+ // TODO: This also matches target artifacts in dependencies. Should not hurt,
+ // but might be a hint that we should have auxiliaryInputsFromDependencies.
+ auxiliaryInputs: product.type.filter(function(t) { return t !== "Exporter.qbs.module"; })
Artifact {
filePath: product.Exporter.qbs.fileName
diff --git a/share/qbs/modules/cpp/UnixGCC.qbs b/share/qbs/modules/cpp/UnixGCC.qbs
index 90df34c24..e5b99cd98 100644
--- a/share/qbs/modules/cpp/UnixGCC.qbs
+++ b/share/qbs/modules/cpp/UnixGCC.qbs
@@ -28,6 +28,8 @@
**
****************************************************************************/
+import qbs.File
+
GenericGCC {
condition: qbs.toolchain && qbs.toolchain.contains("gcc")
&& qbs.targetOS && qbs.targetOS.contains("unix")
@@ -40,7 +42,7 @@ GenericGCC {
dynamicLibrarySuffix: ".so"
debugInfoSuffix: ".debug"
imageFormat: "elf"
- systemRunPaths: ["/lib", "/usr/lib"]
+ systemRunPaths: ["/lib", "/usr/lib"].filter(function(p) { return File.exists(p); })
rpathOrigin: "$ORIGIN"
useRPathLink: true
rpathLinkFlag: "-rpath-link="
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index 896ae48fa..95e3d198c 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -254,6 +254,9 @@ function linkerFlags(project, product, inputs, output, linkerPath) {
var weakFrameworks = product.cpp.weakFrameworks;
var rpaths = (product.cpp.useRPaths !== false) ? product.cpp.rpaths : undefined;
var systemRunPaths = product.cpp.systemRunPaths || [];
+ var canonicalSystemRunPaths = systemRunPaths.map(function(p) {
+ return File.canonicalFilePath(p);
+ });
var i, args = additionalCompilerAndLinkerFlags(product);
var escapableLinkerFlags = [];
@@ -337,8 +340,12 @@ function linkerFlags(project, product, inputs, output, linkerPath) {
return rpath;
}
+ function isNotSystemRunPath(p) {
+ return !systemRunPaths.contains(p)
+ && !canonicalSystemRunPaths.contains(File.canonicalFilePath(p));
+ };
for (i in rpaths) {
- if (systemRunPaths.indexOf(rpaths[i]) === -1)
+ if (isNotSystemRunPath(rpaths[i]))
escapableLinkerFlags.push("-rpath", fixupRPath(rpaths[i]));
}
@@ -382,6 +389,8 @@ function linkerFlags(project, product, inputs, output, linkerPath) {
allLibraryPaths = allLibraryPaths.uniqueConcat(libraryPaths);
if (distributionLibraryPaths)
allLibraryPaths = allLibraryPaths.uniqueConcat(distributionLibraryPaths);
+ if (systemRunPaths.length > 0)
+ allLibraryPaths = allLibraryPaths.filter(isNotSystemRunPath);
args = args.concat(allLibraryPaths.map(function(path) { return '-L' + path }));
var linkerScripts = inputs.linkerscript