From 683331e848f36fe938668e44d0634089b68a8b41 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Wed, 1 Mar 2023 21:45:17 +0800 Subject: [PATCH] - change: Set optimization level to -Og for Debug compiler settings by default. --- NEWS.md | 1 + RedPandaIDE/settings.cpp | 1 + RedPandaIDE/settingsdialog/languageasmgenerationwidget.cpp | 2 ++ 3 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index f1c20f47..7a215a32 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ Red Panda C++ Version 2.16 - enhancement: Add cfi directives for asm syntaxer in linux. - change: Editor option "Scroll past end of line" default to false. - emhancement: Improve display of disassembled codes in the cpu info dialog. + - change: Set optimization level to -Og for Debug compiler settings by default. Red Panda C++ Version 2.15 diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index dbe3380f..bdbb8937 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -2728,6 +2728,7 @@ static void setReleaseOptions(Settings::PCompilerSet pSet) { } static void setDebugOptions(Settings::PCompilerSet pSet, bool enableAsan = false) { + pSet->setCompileOption(CC_CMD_OPT_OPTIMIZE,"g"); pSet->setCompileOption(CC_CMD_OPT_DEBUG_INFO, COMPILER_OPTION_ON); pSet->setCompileOption(CC_CMD_OPT_WARNING_ALL, COMPILER_OPTION_ON); //pSet->setCompileOption(CC_CMD_OPT_WARNING_EXTRA, COMPILER_OPTION_ON); diff --git a/RedPandaIDE/settingsdialog/languageasmgenerationwidget.cpp b/RedPandaIDE/settingsdialog/languageasmgenerationwidget.cpp index 9d27be52..2641843e 100644 --- a/RedPandaIDE/settingsdialog/languageasmgenerationwidget.cpp +++ b/RedPandaIDE/settingsdialog/languageasmgenerationwidget.cpp @@ -7,7 +7,9 @@ LanguageAsmGenerationWidget::LanguageAsmGenerationWidget(const QString &name, co ui(new Ui::LanguageAsmGenerationWidget) { ui->setupUi(this); +#ifndef Q_OS_WIN ui->chkNoSEHDirectives->setText(tr("Don't generate cli directives.")); +#endif #if !defined(ARCH_X86_64) && !defined(ARCH_X86) ui->grpX86Syntax->setVisible(false); #endif