summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <[email protected]>2023-01-11 20:22:14 +0100
committerQt Cherry-pick Bot <[email protected]>2023-01-13 13:50:11 +0000
commit934735822aa78ff11994c0ed122b42cf0411d18a (patch)
tree3a47370773f59274eb4de22efc94b3698c09b3e5
parent818ce40e10fc77e8033c7a5f43796f4af028c889 (diff)
Set GenerateDebugInformation to true in vcproj if at least /DEBUG is set
If the command line option contains /DEBUG without the following argument, GenerateDebugInformation remained 'false' because the DebugInfoOption contained the initial value. Set GenerateDebugInformation to 'true' if the /DEBUG option is found and reset to 'false' only if option is set to 'none'. Amends commit 6a6b27940d497b29672ff65ff242fe0211603f22. Fixes: QTBUG-110068 Change-Id: I792d7335d8b9536d4beed54cabfd70dcf54f09ac Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]> (cherry picked from commit 0e3ef4111271761ede6cbbeb3b0fa075a483085e) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp3
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 58786868288..b5639c01084 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1478,7 +1478,8 @@ bool VCLinkerTool::parseOption(const char* option)
EnableUAC = _True;
break;
case 0x3389797: // /DEBUG[:{FASTLINK|FULL|NONE}]
- if (config->CompilerVersion >= NET2015) {
+ DebugInfoOption = linkerDebugOptionEnabled;
+ if (config->CompilerVersion >= NET2015 && *(option + 6) == ':') {
const char *str = option + 7;
if (qstricmp(str, "fastlink") == 0)
DebugInfoOption = linkerDebugOptionFastLink;
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index f0869d510f8..190d6c727fa 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -258,6 +258,7 @@ enum inlineExpansionOption {
};
enum linkerDebugOption {
linkerDebugOptionNone,
+ linkerDebugOptionEnabled, // represents /DEBUG without further options
linkerDebugOptionFastLink,
linkerDebugOptionFull
};