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>
This commit is contained in:
parent
566ede6ee1
commit
6a6b27940d
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -258,7 +258,8 @@ enum inlineExpansionOption {
|
||||
};
|
||||
enum linkerDebugOption {
|
||||
linkerDebugOptionNone,
|
||||
linkerDebugOptionFastLink
|
||||
linkerDebugOptionFastLink,
|
||||
linkerDebugOptionFull
|
||||
};
|
||||
enum linkIncrementalType {
|
||||
linkIncrementalDefault,
|
||||
|
Loading…
Reference in New Issue
Block a user