From 2373c4c0a4f06b207fdc4b89ef70e66a9fc2adc4 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 15 Jul 2024 17:08:19 +0200 Subject: [PATCH] iOS: Do not enforce architecture for CMake builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not set CMAKE_OSX_ARCHITECTURES, the defaults are fine. It builds for x86_64 for Qt/Simulator/x86_64 and for arm64 for Qt/ Device/arm64 automatically, and then also for custom Qt/Simulator/arm64 builds that didn't work before because we enforced x86_64 for Simulator. Task-number: QTBUG-101276 Change-Id: Ic33eab6d418210ad6384951e0b0f1972a2287a6b Reviewed-by: Tor Arne Vestbø --- src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 3e219a23725..c672515d7b2 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -1546,15 +1546,10 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) // and sysroot in the CMake configuration, but that currently doesn't work with Qt/CMake // https://gitlab.kitware.com/cmake/cmake/-/issues/21276 const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k); - // TODO the architectures are probably not correct with Apple Silicon in the mix... - const QString architecture = deviceType == Ios::Constants::IOS_DEVICE_TYPE - ? QLatin1String("arm64") - : QLatin1String("x86_64"); const QString sysroot = deviceType == Ios::Constants::IOS_DEVICE_TYPE ? QLatin1String("iphoneos") : QLatin1String("iphonesimulator"); cmd.addArg(CMAKE_QT6_TOOLCHAIN_FILE_ARG); - cmd.addArg("-DCMAKE_OSX_ARCHITECTURES:STRING=" + architecture); cmd.addArg("-DCMAKE_OSX_SYSROOT:STRING=" + sysroot); cmd.addArg("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}"); cmd.addArg("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");