From 02ecd3ae40d8e10c56f5c92060257422a8ba9f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 13 Mar 2014 16:16:22 +0100 Subject: Make Xcode debug info format controllable through a qmake variable The default is still DWARF instead of DWARF with dSYM for static builds of Qt, so that debug builds of the final application don't take forever to build due to generating the dSYM file. Change-Id: I370d800d7c959e05c1a8780c4ebf58fff250daa1 Reviewed-by: Oswald Buddenhagen Reviewed-by: Fawzi Mohamed --- mkspecs/features/mac/default_post.prf | 7 +++++++ mkspecs/features/mac/default_pre.prf | 10 ++++++++++ mkspecs/macx-ios-clang/features/default_post.prf | 16 ---------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index da3e22b5f3..530683552b 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -37,6 +37,13 @@ qt:!isEmpty(QT_CONFIG) { } } +macx-xcode:!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { + debug_information_format.name = DEBUG_INFORMATION_FORMAT + debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT + debug_information_format.build = debug + QMAKE_MAC_XCODE_SETTINGS += debug_information_format +} + cache(QMAKE_XCODE_DEVELOPER_PATH, stash) cache(QMAKE_XCODE_VERSION, stash) diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf index c031403930..0cc8cd6dfd 100644 --- a/mkspecs/features/mac/default_pre.prf +++ b/mkspecs/features/mac/default_pre.prf @@ -33,6 +33,16 @@ isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { cache(QMAKE_TARGET_BUNDLE_PREFIX) } +# Make the default debug info format for static debug builds +# DWARF instead of DWARF with dSYM. This cuts down build times +# for application debug builds significantly, as Xcode doesn't +# have to pull out all the DWARF info from the Qt static libs +# and put it into a dSYM file. We don't need that dSYM file in +# the first place, since the information is available in the +# object files inside the archives (static libraries). +contains(QT_CONFIG, static): \ + QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf + # This variable is used by the xcode_dynamic_library_suffix # feature, which allows Xcode to choose the Qt libraries to link to # at build time, depending on the current Xcode SDK and configuration. diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 8b339dacdc..496553f8c0 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -178,22 +178,6 @@ macx-xcode { QMAKE_SUBSTITUTES += copy_image launch_images.files = $$copy_image.output QMAKE_BUNDLE_DATA += launch_images - - # Make the default debug information format for debug builds - # DWARF instead of DWARF with dSYM. This cuts down build times - # for application debug builds significantly, as Xcode doesn't - # have to pull out all the DWARF info from our static libraries - # and put it into a dSYM file. We don't need that dSYM file in - # the first place, since the information is available in the - # object files inside the archives (static libraries). The only - # unfortunate side effect of this is that the user won't be - # able to break on specific lines of main(). This is due to - # using ld to rename the main-function, and will go away once - # we implement a separate tool to do the symbol renaming. - debug_information_format.name = DEBUG_INFORMATION_FORMAT - debug_information_format.value = dwarf - debug_information_format.build = debug - QMAKE_MAC_XCODE_SETTINGS += debug_information_format } macx-xcode { -- cgit v1.2.3