- fix: Compiler set options "Check for stack smashing attacks (-fstack-protector)" was not correctly applied when compiling.

This commit is contained in:
Roy Qu 2024-04-06 09:30:35 +08:00
parent 384396d196
commit 8c6cef0ad9
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ void CompilerInfo::prepareCompilerOptions()
addOption(CC_CMD_OPT_WARNING_AS_ERROR, QObject::tr("Make all warnings into errors (-Werror)"), groupName, true, true, false, "-Werror"); addOption(CC_CMD_OPT_WARNING_AS_ERROR, QObject::tr("Make all warnings into errors (-Werror)"), groupName, true, true, false, "-Werror");
addOption(CC_CMD_OPT_ABORT_ON_ERROR , QObject::tr("Abort compilation on first error (-Wfatal-errors)"), groupName, true, true, false, "-Wfatal-errors"); addOption(CC_CMD_OPT_ABORT_ON_ERROR , QObject::tr("Abort compilation on first error (-Wfatal-errors)"), groupName, true, true, false, "-Wfatal-errors");
sl.clear(); sl.clear();
sl.append(QPair<QString,QString>("Normal"," ")); sl.append(QPair<QString,QString>("Normal",""));
sl.append(QPair<QString,QString>("Strong","-strong")); sl.append(QPair<QString,QString>("Strong","-strong"));
sl.append(QPair<QString,QString>("All","-all")); sl.append(QPair<QString,QString>("All","-all"));
addOption(CC_CMD_OPT_STACK_PROTECTOR , QObject::tr("Check for stack smashing attacks (-fstack-protector)"), groupName, false, false, true, "-fstack-protector", CompilerOptionType::Choice, sl); addOption(CC_CMD_OPT_STACK_PROTECTOR , QObject::tr("Check for stack smashing attacks (-fstack-protector)"), groupName, false, false, true, "-fstack-protector", CompilerOptionType::Choice, sl);