From 7ec215301612e7d52352738629d64360c48baf28 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 16 May 2022 18:32:32 +0200 Subject: qmake: iOS: Don't pass -fobjc-nonfragile-abi -fobjc-legacy-dispatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to latest clang source code (llvm-14.0.3) non-fragile ABI is default for everything but i386 which means we can stop passing the -fobjc-nonfragile-abi option. See https://github.com/llvm/llvm-project/blob/llvmorg-14.0.3/clang/lib/Driver/ToolChains/Darwin.h#L245 This gets rid of the following warning when building a qmake project for iOS, while targeting the iOS simulator: clang: warning: argument unused during compilation: '-fobjc-nonfragile-abi' [-Wunused-command-line-argument It only happens for the simulator case because Xcode adds the -fobjc-abi-version=2 option, thus the qmake one gets ignored. As a drive-by also remove the usage of the -fobjc-legacy-dispatch option. According to clang sources it should be implicitly used on iOS. See https://github.com/llvm/llvm-project/blob/llvmorg-14.0.3/clang/include/clang/Basic/ObjCRuntime.h#L100 Amends d788f636691df5cae59d44a3828a0ddd58c343d0 Pick-to: 6.2 6.3 Fixes: QTBUG-103001 Change-Id: I06f8e46e40a1f04c5bbc4f177afa035e525dfed6 Reviewed-by: Jörg Bornemann Reviewed-by: Tor Arne Vestbø --- mkspecs/common/uikit/clang.conf | 4 ---- 1 file changed, 4 deletions(-) (limited to 'mkspecs/common') diff --git a/mkspecs/common/uikit/clang.conf b/mkspecs/common/uikit/clang.conf index 6b9b7eea8e..f828f8b6f8 100644 --- a/mkspecs/common/uikit/clang.conf +++ b/mkspecs/common/uikit/clang.conf @@ -1,7 +1,3 @@ # # compiler settings for iOS/tvOS/watchOS clang compilers # - -# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html, -# we can conclude that it's safe to always pass the following flags -QMAKE_OBJECTIVE_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch -- cgit v1.2.3