From d2b4a789c39eb770068b002d2bc9ceb764dedf3d Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 30 Sep 2016 11:10:49 -0700 Subject: [PATCH] Fix explicit -sdk iphoneos builds The order in which exclusive builds are added affects the order of values in SUBTARGETS. xcodebuild.mk parses the value of SUBTARGETS in the Makefile and selects the first entry, which would always be release-iphonesimulator regardless of the build type. This obviously caused -sdk iphoneos builds to fail. This patch switches the order of in which exclusive builds are added so that the entries which are not present in a particular build type are always added last. Change-Id: I306d6f7430c1dff3d741a8c5182b7af81d000e7f Reviewed-by: Oswald Buddenhagen --- mkspecs/macx-ios-clang/features/resolve_config.prf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mkspecs/macx-ios-clang/features/resolve_config.prf b/mkspecs/macx-ios-clang/features/resolve_config.prf index d1d3e8ca39..64db2252cb 100644 --- a/mkspecs/macx-ios-clang/features/resolve_config.prf +++ b/mkspecs/macx-ios-clang/features/resolve_config.prf @@ -26,7 +26,12 @@ macx-xcode { } else { iphonesimulator.name = Simulator iphoneos.name = Device - addExclusiveBuilds(iphonesimulator, iphoneos) + + # Switch the order to make sure that the first Makefile target is the right one + !contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^iphonesimulator.*): \ + addExclusiveBuilds(iphonesimulator, iphoneos) + else: \ + addExclusiveBuilds(iphoneos, iphonesimulator) } equals(TEMPLATE, subdirs) {