From 6668da028ba9a3854a2190191a899efc6bccb2f8 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Sun, 25 Oct 2020 15:06:42 +0100 Subject: Xcode: fix compilation for ios-simulator with Xcode 12 The triplet -target x86_64-apple-ios-macho is no longer valid, it should be -target x86_64-apple-ios8.0-macho Change-Id: Ib7ce96100e1751625784db7385b44c53a2747e07 Reviewed-by: Christian Kandeler --- changelogs/changes-1.17.1.md | 3 ++- share/qbs/modules/cpp/ios-gcc.qbs | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/changelogs/changes-1.17.1.md b/changelogs/changes-1.17.1.md index 1f14fcd41..ef5a39f83 100644 --- a/changelogs/changes-1.17.1.md +++ b/changelogs/changes-1.17.1.md @@ -2,8 +2,9 @@ * Android: Fix support for Qt 5.15 (QBS-1580). * Android: Allow exporting of Qt modules in Export items (QBS-1576) - +* Darwin: Fix ios-simulator builds with XCode 12 # Contributors * Raphaƫl Cotty +* Ivan Komissarov diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs index 0ff99679f..2d73c8125 100644 --- a/share/qbs/modules/cpp/ios-gcc.qbs +++ b/share/qbs/modules/cpp/ios-gcc.qbs @@ -39,6 +39,14 @@ DarwinGCC { condition: qbs.targetOS.contains('ios') && qbs.toolchain && qbs.toolchain.contains('gcc') + minimumIosVersion: { + if (qbs.architecture == "armv7a") + return "6.0"; + // XCode 12 requres version (at least 8.0) to be present in the -target triplet + // when compiling for ios-simulator + if (xcode.present && Utilities.versionCompare(xcode.version, "12.0") >= 0) + return "8.0"; + } targetSystem: "ios" + (minimumIosVersion || "") minimumDarwinVersion: minimumIosVersion -- cgit v1.2.3