Stop blocking the ability to generate dSYM debug symbols with Xcode

In Xcode, the default value for GCC_GENERATE_DEBUGGING_SYMBOLS is YES,
which causes Xcode to emit debug symbol bundles (.dSYM) on macOS and iOS
*if* DEBUG_INFORMATION_FORMAT is also set to dwarf-with-dsym. Since that
setting is already set to an appropriate value with debug vs release
builds, the default Xcode value for GCC_GENERATE_DEBUGGING_SYMBOLS is
already correct and in effect the only thing qmake was doing was always
setting GCC_GENERATE_DEBUGGING_SYMBOLS to a wrong value for release
builds - it should be YES in all cases, to allow the .dSYM bundles to
be generated in release mode, which is in fact the only case where
they're really needed in the first place.

Task-number: QTBUG-41246
Task-number: QTBUG-50896
Change-Id: I07639a3c4ff9f62d591cde3ad66748767d475e3b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Jake Petroules 2017-12-12 20:13:28 -08:00 committed by Erik Verbruggen
parent 2086c183c1
commit 6a2609f379

View File

@ -280,8 +280,6 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
QMap<QString, QString> settings;
settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
if(as_release)
settings.insert("GCC_GENERATE_DEBUGGING_SYMBOLS", "NO");
if(project->isActiveConfig("sdk") && !project->isEmpty("QMAKE_MAC_SDK"))
settings.insert("SDKROOT", project->first("QMAKE_MAC_SDK").toQString());
{
@ -1499,7 +1497,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
settings.insert("APPLICATION_EXTENSION_API_ONLY", project->isActiveConfig("app_extension_api_only") ? "YES" : "NO");
// required for tvOS (and watchos), optional on iOS (deployment target >= iOS 6.0)
settings.insert("ENABLE_BITCODE", project->isActiveConfig("bitcode") ? "YES" : "NO");
settings.insert("GCC_GENERATE_DEBUGGING_SYMBOLS", as_release ? "NO" : "YES");
if(!as_release)
settings.insert("GCC_OPTIMIZATION_LEVEL", "0");
if(project->isActiveConfig("sdk") && !project->isEmpty("QMAKE_MAC_SDK"))