qmake: set COPY_PHASE_STRIP to NO in Xcode generator

Since Xcode 6.3, this must be set to NO because stripping on copy is no
longer fully supported due to the potential of input binaries being code
signed. In this case Xcode will simply ignore the strip step and issue
a warning since stripping would invalidate the code signature. This
change silences that annoying warning for release builds. Also, the
setting assignment is moved from being hardcoded in the generator, to
a QMAKE_MAC_XCODE_SETTINGS value.

Change-Id: If25511edddc12b7b0407e2992d80884b7d6437dc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This commit is contained in:
Jake Petroules 2018-01-05 00:40:46 -08:00
parent fe72571da8
commit 1c8224511d
2 changed files with 4 additions and 2 deletions

View File

@ -54,3 +54,7 @@ macx-xcode:qtConfig(static): \
# feature, which allows Xcode to choose the Qt libraries to link to # feature, which allows Xcode to choose the Qt libraries to link to
# at build time, depending on the current Xcode SDK and configuration. # at build time, depending on the current Xcode SDK and configuration.
QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP
xcode_copy_phase_strip_setting.value = NO
QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting

View File

@ -279,7 +279,6 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
QString configName = (as_release ? "Release" : "Debug"); QString configName = (as_release ? "Release" : "Debug");
QMap<QString, QString> settings; QMap<QString, QString> settings;
settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
if(project->isActiveConfig("sdk") && !project->isEmpty("QMAKE_MAC_SDK")) if(project->isActiveConfig("sdk") && !project->isEmpty("QMAKE_MAC_SDK"))
settings.insert("SDKROOT", project->first("QMAKE_MAC_SDK").toQString()); settings.insert("SDKROOT", project->first("QMAKE_MAC_SDK").toQString());
{ {
@ -1493,7 +1492,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
settings.insert("PROVISIONING_PROFILE_SPECIFIER", project->first("QMAKE_PROVISIONING_PROFILE").toQString()); settings.insert("PROVISIONING_PROFILE_SPECIFIER", project->first("QMAKE_PROVISIONING_PROFILE").toQString());
} }
settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
settings.insert("APPLICATION_EXTENSION_API_ONLY", project->isActiveConfig("app_extension_api_only") ? "YES" : "NO"); 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) // required for tvOS (and watchos), optional on iOS (deployment target >= iOS 6.0)
settings.insert("ENABLE_BITCODE", project->isActiveConfig("bitcode") ? "YES" : "NO"); settings.insert("ENABLE_BITCODE", project->isActiveConfig("bitcode") ? "YES" : "NO");