aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-12-08 13:10:04 -0800
committerJake Petroules <jake.petroules@qt.io>2016-12-09 19:21:06 +0000
commit574d4ef812f9dcbb54ce659d2c6f247be773d0de (patch)
tree0b95cc4b4409fba6ee8f27e2e2cdf312e7604b69 /share
parentbabbf2156579e6e0bbdac973aa5fc8c30d00b806 (diff)
Fix passing -arch x86_64h or -arch armv7 to Clang for Apple targets
This fixes a regression `clang: error: invalid arch name '-arch armv7a'` when building for iOS armv7, which affects Qt Creator in particular. Expand the scope of the deploymentTarget autotest to verify it does not happen again. Change-Id: Ic2689ec4474f74642d3de641b57a52854d2a8bdc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/imports/qbs/ModUtils/utils.js2
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs3
-rw-r--r--share/qbs/modules/java/utils.js4
3 files changed, 7 insertions, 2 deletions
diff --git a/share/qbs/imports/qbs/ModUtils/utils.js b/share/qbs/imports/qbs/ModUtils/utils.js
index 800a58bc0..36d34dadb 100644
--- a/share/qbs/imports/qbs/ModUtils/utils.js
+++ b/share/qbs/imports/qbs/ModUtils/utils.js
@@ -554,6 +554,8 @@ function guessArchitecture(m) {
architecture = "x86";
} else if (hasAnyOf(m, ["__x86_64", "__x86_64__", "__amd64", "_M_X64", "_M_AMD64"])) {
architecture = "x86_64";
+ if (hasAnyOf(m, ["__x86_64h", "__x86_64h__"]))
+ architecture = "x86_64h";
} else if (hasAnyOf(m, ["__ia64", "__ia64__", "_M_IA64"])) {
architecture = "ia64";
} else if (hasAnyOf(m, ["__mips", "__mips__", "_M_MRX000"])) {
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index edf1a3fbe..0ad21fa96 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -61,7 +61,8 @@ CppModule {
compilerLibraryPaths: gccProbe.libraryPaths
property string target: [targetArch, targetVendor, targetSystem, targetAbi].join("-")
- property string targetArch: qbs.architecture === "x86" ? "i386" : qbs.architecture
+ property string targetArch: Utilities.canonicalTargetArchitecture(
+ qbs.architecture, targetVendor, targetSystem, targetAbi)
property string targetVendor: "unknown"
property string targetSystem: "unknown"
property string targetAbi: "unknown"
diff --git a/share/qbs/modules/java/utils.js b/share/qbs/modules/java/utils.js
index 632fc8102..aebe9c617 100644
--- a/share/qbs/modules/java/utils.js
+++ b/share/qbs/modules/java/utils.js
@@ -101,7 +101,9 @@ function findJdkPath(hostOS, arch, environmentPaths, searchPaths) {
// We filter by architecture here so that we'll get a compatible JVM for JNI use.
var args = [];
if (arch) {
- args.push("--arch", arch === "x86" ? "i386" : arch);
+ // Hardcoding apple/macosx/macho here is fine because we know we're on macOS
+ args.push("--arch",
+ Utilities.canonicalTargetArchitecture(arch, "apple", "macosx", "macho"));
}
// --failfast doesn't print the default JVM if nothing matches the filter(s).