diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-06-21 21:28:46 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-06-23 17:29:37 +0000 |
commit | 29435f9ee37f4990a968e400f1c65e5686717c65 (patch) | |
tree | 47e6f855417d49bf794c9b7e7d60cf13fdb1ce90 | |
parent | 815bfbea8bb816e0853e75fff1c30a5b92c64e19 (diff) |
Add a property to specify the -rpath-link flag
Will be used in a following patch.
Change-Id: I43c0c093fd0c0278e4bfd72e6ed457b57bc6ba32
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | share/qbs/modules/cpp/CppModule.qbs | 1 | ||||
-rw-r--r-- | share/qbs/modules/cpp/UnixGCC.qbs | 1 | ||||
-rw-r--r-- | share/qbs/modules/cpp/gcc.js | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs index f5db76753..75425924e 100644 --- a/share/qbs/modules/cpp/CppModule.qbs +++ b/share/qbs/modules/cpp/CppModule.qbs @@ -174,6 +174,7 @@ Module { property string sonamePrefix property bool useRPaths: true property bool useRPathLink + property string rpathLinkFlag property stringList assemblerFlags PropertyOptions { diff --git a/share/qbs/modules/cpp/UnixGCC.qbs b/share/qbs/modules/cpp/UnixGCC.qbs index b360d56fa..ee5171611 100644 --- a/share/qbs/modules/cpp/UnixGCC.qbs +++ b/share/qbs/modules/cpp/UnixGCC.qbs @@ -44,5 +44,6 @@ GenericGCC { imageFormat: "elf" systemRunPaths: ["/lib", "/usr/lib"] useRPathLink: true + rpathLinkFlag: "-rpath-link=" } diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index b25372918..fba46f879 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -457,11 +457,13 @@ function linkerFlags(project, product, inputs, output, linkerPath) { } if (product.cpp.useRPathLink) { + if (!product.cpp.rpathLinkFlag) + throw new Error("Using rpath-link but cpp.rpathLinkFlag is not defined"); args = args.concat(escapeLinkerFlags( product, inputs, libraryDependencies.rpath_link.map( function(dir) { - return "-rpath-link=" + dir; + return product.cpp.rpathLinkFlag + dir; }))); } |