complete implementation of force_debug_info
that means further detaching the generation and installation of debug info from the thing calling itself A Debug Build. Task-number: QTBUG-32412 Change-Id: I4d79d1ae4806c8e4a2d6a7ccd030fb88385dd7d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
c31ab2139a
commit
a5f6536d9f
@ -29,6 +29,9 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
|
||||
CONFIG -= no_debug_info separate_debug_info
|
||||
}
|
||||
|
||||
force_debug_info|debug: \
|
||||
CONFIG += debug_info
|
||||
|
||||
force_debug_info {
|
||||
QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
@ -69,11 +72,6 @@ silent {
|
||||
CONFIG = silent $$CONFIG
|
||||
}
|
||||
|
||||
force_debug_info:win32 {
|
||||
load(resolve_target)
|
||||
QMAKE_CLEAN += $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb) # for the debug case it is hardcoded in qmake
|
||||
}
|
||||
|
||||
breakpad {
|
||||
load(resolve_target)
|
||||
DEBUGFILENAME = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET))
|
||||
|
@ -1314,7 +1314,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
cmd = "-$(INSTALL_FILE)";
|
||||
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
|
||||
inst << cmd;
|
||||
if(!project->isActiveConfig("debug") && !project->isActiveConfig("nostrip") &&
|
||||
if (!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)));
|
||||
@ -1357,7 +1357,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " " +
|
||||
escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file);
|
||||
inst << cmd;
|
||||
if(!project->isActiveConfig("debug") && !project->isActiveConfig("nostrip") &&
|
||||
if (!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)));
|
||||
|
@ -818,7 +818,8 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
|
||||
if(!project->isEmpty("QMAKE_RANLIB"))
|
||||
ret += QString("\n\t$(RANLIB) \"") + dst_targ + "\"";
|
||||
} else if(!project->isActiveConfig("debug") && !project->isActiveConfig("nostrip") && !project->isEmpty("QMAKE_STRIP")) {
|
||||
} else if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip")
|
||||
&& !project->isEmpty("QMAKE_STRIP")) {
|
||||
ret += "\n\t-$(STRIP)";
|
||||
if (project->first("TEMPLATE") == "lib") {
|
||||
if (!project->isEmpty("QMAKE_STRIPFLAGS_LIB"))
|
||||
|
@ -403,6 +403,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
|
||||
if(project->isActiveConfig("debug"))
|
||||
incr_lflags += var("QMAKE_LFLAGS_DEBUG");
|
||||
else if (project->isActiveConfig("debug_info"))
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO");
|
||||
else
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE");
|
||||
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
@ -498,6 +500,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
incr_lflags += var("QMAKE_LFLAGS_INCREMENTAL") + " ";
|
||||
if(project->isActiveConfig("debug"))
|
||||
incr_lflags += var("QMAKE_LFLAGS_DEBUG");
|
||||
else if (project->isActiveConfig("debug_info"))
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO");
|
||||
else
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE");
|
||||
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
|
@ -235,7 +235,7 @@ QString NmakeMakefileGenerator::defaultInstall(const QString &t)
|
||||
if(targetdir.right(1) != Option::dir_sep)
|
||||
targetdir += Option::dir_sep;
|
||||
|
||||
if (project->isActiveConfig("debug")) {
|
||||
if (project->isActiveConfig("debug_info")) {
|
||||
if (t == "dlltarget"
|
||||
|| project->first("TEMPLATE") != "lib"
|
||||
|| (project->isActiveConfig("shared")
|
||||
@ -390,10 +390,12 @@ void NmakeMakefileGenerator::init()
|
||||
if(project->isActiveConfig("shared")) {
|
||||
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".exp");
|
||||
}
|
||||
if(project->isActiveConfig("debug")) {
|
||||
if (project->isActiveConfig("debug_info")) {
|
||||
project->values("QMAKE_DISTCLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
|
||||
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk");
|
||||
project->values("QMAKE_CLEAN").append("vc*.pdb");
|
||||
}
|
||||
if (project->isActiveConfig("debug")) {
|
||||
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk");
|
||||
project->values("QMAKE_CLEAN").append("vc*.idb");
|
||||
} else {
|
||||
ProStringList &defines = project->values("DEFINES");
|
||||
|
@ -932,7 +932,7 @@ void VcprojGenerator::initConfiguration()
|
||||
if(projectTarget == StaticLib)
|
||||
initLibrarianTool();
|
||||
else {
|
||||
conf.linker.GenerateDebugInformation = isDebug ? _True : _False;
|
||||
conf.linker.GenerateDebugInformation = project->isActiveConfig("debug_info") ? _True : _False;
|
||||
initLinkerTool();
|
||||
}
|
||||
initManifestTool();
|
||||
|
Loading…
Reference in New Issue
Block a user