aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/java/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/java/utils.js')
-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).