qmake: Add support for installing executable files without calling strip
Since some files are still executable (such as bash scripts) then they should not get strip called on them when installing in those cases. So by adding .CONFIG = nostrip, it indicates that strip should not be called on this. Fixes: QTBUG-60751 Change-Id: I19d502c07644daf9d487a8817c8e57d96eedab60 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
23207d1d23
commit
f377b1ddfb
@ -1289,6 +1289,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
}
|
||||
}
|
||||
bool is_target = (wild == fileFixify(var("TARGET"), FileFixifyAbsolute));
|
||||
const bool noStrip = installConfigValues.contains("nostrip");
|
||||
if(is_target || exists(wild)) { //real file or target
|
||||
QFileInfo fi(fileInfo(wild));
|
||||
QString dst_file = filePrefixRoot(root, dst_dir);
|
||||
@ -1302,7 +1303,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
cmd = QLatin1String("-$(QINSTALL)");
|
||||
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
|
||||
inst << cmd;
|
||||
if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
|
||||
if (!noStrip && !project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
|
||||
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
|
||||
inst << QString("-") + var("QMAKE_STRIP") + " " +
|
||||
escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + filestr, FileFixifyAbsolute, false)));
|
||||
@ -1337,7 +1338,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
QString cmd = QLatin1String("-$(QINSTALL) ") +
|
||||
escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file);
|
||||
inst << cmd;
|
||||
if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
|
||||
if (!noStrip && !project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
|
||||
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
|
||||
inst << QString("-") + var("QMAKE_STRIP") + " " +
|
||||
escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + file, FileFixifyAbsolute, false)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user