aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/java
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/qbs/modules/java
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/qbs/modules/java')
-rw-r--r--share/qbs/modules/java/utils.js4
1 files changed, 3 insertions, 1 deletions
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).