diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-06-20 13:04:13 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-06-21 16:01:59 +0000 |
commit | ab962bcf80825f7f9135ff339d66a3db44693225 (patch) | |
tree | cd0de880707842a725c85ba5769624f0dd295d7e | |
parent | 1913b32bd828c53f6845ed00dae99512e8d81321 (diff) |
Try harder to find lipo
Apple moved it around a lot in earlier versions of Xcode and macOS.
Change-Id: I1ab300ddaf2c50ef2aa5e633ead64dbe8972d1bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 19 | ||||
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 4 |
2 files changed, 21 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index fd276e554..67fd2d3b5 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -34,6 +34,7 @@ import qbs.File import qbs.FileInfo import qbs.ModUtils import qbs.PathTools +import qbs.Probes import qbs.PropertyList import qbs.TextFile import "darwin.js" as Darwin @@ -44,6 +45,24 @@ UnixGCC { Depends { name: "xcode"; required: qbs.toolchain && qbs.toolchain.contains("xcode") } + Probes.BinaryProbe { + id: lipoProbe + names: [lipoName] + platformPaths: { + var paths = (xcode.present && xcode.devicePlatformPath) + ? [xcode.devicePlatformPath + "/Developer/usr/bin"] + : []; + return paths.concat([toolchainInstallPath, "/usr/bin"]); + } + } + + property string lipoPathPrefix: Gcc.pathPrefix(lipoProbe.found + ? lipoProbe.path + : toolchainInstallPath, toolchainPrefix) + + lipoName: "lipo" + lipoPath: lipoPathPrefix + lipoName + targetVendor: "apple" targetSystem: "darwin" targetAbi: "macho" diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 2b7cc94e9..c9e10d081 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -120,7 +120,7 @@ CppModule { property string objcopyName: "objcopy" property string stripName: "strip" property string dsymutilName: "dsymutil" - property string lipoName: "lipo" + property string lipoName property string sysroot: qbs.sysroot property string syslibroot: sysroot property stringList sysrootFlags: sysroot ? ["--sysroot=" + sysroot] : [] @@ -177,7 +177,7 @@ CppModule { property string objcopyPath: binutilsPathPrefix + objcopyName property string stripPath: binutilsPathPrefix + stripName property string dsymutilPath: toolchainPathPrefix + dsymutilName - property string lipoPath: toolchainPathPrefix + lipoName + property string lipoPath property stringList dsymutilFlags property bool alwaysUseLipo: false |