From c5192b300e7f3e24720a5886a25ed932e0e7f335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 16 Jan 2014 19:43:07 +0100 Subject: [PATCH] iOS: Fix simulator build by enabling SSE2 code paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 3c375a76a13e151496ccfea0a2b3ff9fdc75784f enabled SSE2 in Qt, but we failed to build the files that implemented the SSE2 specific drawhelpers and image functions. Since we know what the iOS simulator supports and the platforms it runs on we can safely enable this ourselves without it being based on a configure test. Change-Id: I0cfc43de80068b89aa47c34ffa84ee1c1734886c Reviewed-by: Tor Arne Vestbø --- mkspecs/macx-ios-clang/features/default_post.prf | 12 +++--------- mkspecs/macx-ios-clang/features/default_pre.prf | 9 +++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 09e1951be08..6662bb9c8e3 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -7,6 +7,9 @@ contains(QMAKE_MAC_SDK, ^iphonesimulator.*) { CONFIG += iphonesimulator } +iphonesimulator_and_iphoneos:iphonesimulator: \ + QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator, + # Resolve config so we don't need to use CONFIG() later on CONFIG(iphonesimulator, iphonesimulator|iphoneos) { CONFIG -= iphoneos @@ -118,15 +121,6 @@ equals(TEMPLATE, app) { iphonesimulator.name = Simulator iphoneos.name = Device addExclusiveBuilds(iphonesimulator, iphoneos) - - iphonesimulator_and_iphoneos:iphonesimulator { - QT_ARCH = i386 - QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator, - - # Since the CPU feature detection done by configure is limited to one - # target at the moment, we disable SIMD support for simulator. - CONFIG -= simd - } } else: equals(TEMPLATE, subdirs) { # Prevent recursion into host_builds for(subdir, SUBDIRS) { diff --git a/mkspecs/macx-ios-clang/features/default_pre.prf b/mkspecs/macx-ios-clang/features/default_pre.prf index 3501f5eae00..7b8f9c9b5d1 100644 --- a/mkspecs/macx-ios-clang/features/default_pre.prf +++ b/mkspecs/macx-ios-clang/features/default_pre.prf @@ -8,3 +8,12 @@ load(default_pre) # Check for supported Xcode versions lessThan(QMAKE_XCODE_VERSION, "4.3"): \ error("This mkspec requires Xcode 4.3 or later") + +iphonesimulator_and_iphoneos:iphonesimulator { + # For a iphonesimulator_and_iphoneos build all the config tests + # are based on the iPhoneOS ARM SDK, but we know that the simulator + # is i386 and that we support SSE/SSE2. + QT_ARCH = i386 + QT_CPU_FEATURES.i386 = sse sse2 + DEFINES += QT_COMPILER_SUPPORTS_SSE2 +}