summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-06-21 14:47:42 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-06-22 16:05:07 +0200
commit6a6b27940d497b29672ff65ff242fe0211603f22 (patch)
tree45e879d6ab1f398b0271ff296cb7a1623e3a0a3c /qmake
parent566ede6ee169e87addab38ec64e527e76bc475e9 (diff)
qmake/msbuild: Support all /DEBUG:xxx linker options
/DEBUG:OFF now turns debug info generation off. /DEBUG:FULL maps to DebugFull. Unknown /DEBUG:xxx options are added to AdditionalOptions. Pick-to: 5.15 6.2 6.3 6.4 Task-number: QTBUG-104450 Change-Id: Ibd072145e51551b29370e809b880c0d7f1a00c03 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp2
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp20
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h3
3 files changed, 20 insertions, 5 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 42ea67481b..ba3bc37088 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1099,6 +1099,8 @@ static inline QString toString(triState genDebugInfo, linkerDebugOption option)
case _True:
if (option == linkerDebugOptionFastLink)
return "DebugFastLink";
+ else if (option == linkerDebugOptionFull)
+ return "DebugFull";
return "true";
}
return QString();
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 808aaf26e3..dded7410cc 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1477,10 +1477,22 @@ bool VCLinkerTool::parseOption(const char* option)
}else
EnableUAC = _True;
break;
- case 0x3389797: // /DEBUG[:FASTLINK]
- GenerateDebugInformation = _True;
- if (config->CompilerVersion >= NET2015 && strcmp(option + 7, "FASTLINK") == 0)
- DebugInfoOption = linkerDebugOptionFastLink;
+ case 0x3389797: // /DEBUG[:{FASTLINK|FULL|NONE}]
+ if (config->CompilerVersion >= NET2015) {
+ const char *str = option + 7;
+ if (qstricmp(str, "fastlink") == 0)
+ DebugInfoOption = linkerDebugOptionFastLink;
+ else if (qstricmp(str, "full") == 0)
+ DebugInfoOption = linkerDebugOptionFull;
+ else if (qstricmp(str, "none") == 0)
+ DebugInfoOption = linkerDebugOptionNone;
+ else
+ AdditionalOptions += option;
+ }
+ if (DebugInfoOption == linkerDebugOptionNone)
+ GenerateDebugInformation = _False;
+ else
+ GenerateDebugInformation = _True;
break;
case 0x0033896: // /DEF:filename
ModuleDefinitionFile = option+5;
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 3bcd16c1aa..f0869d510f 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -258,7 +258,8 @@ enum inlineExpansionOption {
};
enum linkerDebugOption {
linkerDebugOptionNone,
- linkerDebugOptionFastLink
+ linkerDebugOptionFastLink,
+ linkerDebugOptionFull
};
enum linkIncrementalType {
linkIncrementalDefault,