diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-06-21 21:30:15 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-06-23 17:30:49 +0000 |
commit | b20130e3975195c30bf05ef972766d9c2e6a896b (patch) | |
tree | 78cc2e5a20f83aa63a450fcfda795acc80c174c2 | |
parent | 29435f9ee37f4990a968e400f1c65e5686717c65 (diff) |
Implement rpath-link for Darwin platforms
This is only needed when targeting 10.4 (and who needs that now?), but
it's zero lines of code to implement this, versus > 0 lines of code
to adapt the relevant autotests... so just do it.
Change-Id: I5dc0cb5e4c49111a71ef9f7ececce97225e28d8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | doc/reference/modules/cpp-module.qdoc | 2 | ||||
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index 610f97420..46c38b4cd 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -671,7 +671,7 @@ \li useRPathLink \li \c{bool} \li 1.8 - \li \c{true} on non-Darwin Unix platforms. + \li \c{true} on non-Darwin Unix platforms or when targeting macOS 10.4.x and older. \li Use the \c{-rpath-link} linker option for transitive shared objects. \row \li visibility diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 67fd2d3b5..c1c92e740 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -37,6 +37,7 @@ import qbs.PathTools import qbs.Probes import qbs.PropertyList import qbs.TextFile +import qbs.Utilities import "darwin.js" as Darwin import "gcc.js" as Gcc @@ -83,7 +84,9 @@ UnixGCC { separateDebugInformation: true debugInfoBundleSuffix: ".dSYM" debugInfoSuffix: ".dwarf" - useRPathLink: false + useRPathLink: !minimumDarwinVersion + || Utilities.versionCompare(minimumDarwinVersion, "10.5") < 0 + rpathLinkFlag: "-L" toolchainInstallPath: xcode.present ? FileInfo.joinPaths(xcode.toolchainPath, "usr", "bin") : base |