From 574d4ef812f9dcbb54ce659d2c6f247be773d0de Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 8 Dec 2016 13:10:04 -0800 Subject: 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 --- share/qbs/modules/java/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'share/qbs/modules/java') 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). -- cgit v1.2.3