--- a/qtbase/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qtbase/qmake/generators/win32/msvc_objectmodel.cpp @@ -1478,6 +1478,7 @@ bool VCLinkerTool::parseOption(const char* option) EnableUAC = _True; break; case 0x3389797: // /DEBUG[:{FASTLINK|FULL|NONE}] + GenerateDebugInformation = _True; if (config->CompilerVersion >= NET2015) { const char *str = option + 7; if (qstricmp(str, "fastlink") == 0) @@ -1486,13 +1487,13 @@ bool VCLinkerTool::parseOption(const char* option) DebugInfoOption = linkerDebugOptionFull; else if (qstricmp(str, "none") == 0) DebugInfoOption = linkerDebugOptionNone; - else - AdditionalOptions += option; + else { + // If there is something after /DEBUG: and it is not one of + // {fastlink,full,none}, then return it as an additional option + if (qstrnlen(str, 50) != 0) + AdditionalOptions += option; + } } - if (DebugInfoOption == linkerDebugOptionNone) - GenerateDebugInformation = _False; - else - GenerateDebugInformation = _True; break; case 0x0033896: // /DEF:filename ModuleDefinitionFile = option+5;