From 9b8c4b3dea52a7d1c5386de8cc3ae46a45435c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 29 Oct 2013 14:14:03 +0100 Subject: iOS: Be more specific in where we look for object files to rename main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building under Xcode we can limit the object files search to the current SDK and debug/release configuration. Change-Id: Ic405f13f46a594e3ed20d82ca6b84e7e67edebfc Reviewed-by: Oswald Buddenhagen Reviewed-by: Morten Johan Sørvig --- mkspecs/macx-ios-clang/features/qt.prf | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/macx-ios-clang/features/qt.prf b/mkspecs/macx-ios-clang/features/qt.prf index 2897c62819..9202a70a5a 100644 --- a/mkspecs/macx-ios-clang/features/qt.prf +++ b/mkspecs/macx-ios-clang/features/qt.prf @@ -31,14 +31,19 @@ equals(TEMPLATE, app):contains(QT, gui(-private)?) { # able to add symbolic breakpoints for 'main', not caring that the symbol is actually # called 'qt_main' now. - isEmpty(OBJECTS_DIR): \ - OBJECTS_DIR = . + macx-xcode { + objects_dir = "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}/${CURRENT_ARCH}" + } else { + objects_dir = $$OBJECTS_DIR + isEmpty(objects_dir): \ + objects_dir = . + } !isEmpty(QMAKE_PRE_LINK): \ QMAKE_PRE_LINK += ";" QMAKE_PRE_LINK += \ - "for f in $(find $${OBJECTS_DIR} -name '*.o'); do" \ + "for f in $(find $${objects_dir} -name '*.o'); do" \ "(nm $f | grep -q 'T _main' && cp $f $f.original" \ "&& ld -r -alias _main _qt_main -unexported_symbol _main $f.original -o $f)" \ "|| true" \ -- cgit v1.2.3