fix: Options are lost when compiling using sdcc

This commit is contained in:
Roy Qu 2023-08-14 18:03:25 +08:00
parent b16a85d033
commit c2c2e3c9b1
3 changed files with 16 additions and 6 deletions

View File

@ -427,7 +427,7 @@ void SDCCCompilerInfo::prepareCompilerOptions()
sl.append(QPair<QString,QString>("Padauk processors with 15 bit wide program memory","pdk15"));
sl.append(QPair<QString,QString>("Padauk processors with 15 bit wide program memory","pdk15"));
sl.append(QPair<QString,QString>("Padauk processors with 15 bit wide program memory","pdk15"));
addOption(SDCC_CMD_OPT_PROCESSOR, QObject::tr("Processor (-m)"), groupName, true, true, false, "-m", sl);
addOption(SDCC_CMD_OPT_PROCESSOR, QObject::tr("Processor (-m)"), groupName, true, false, false, "-m", sl);
// C++ Language Standards
sl.clear();
@ -441,6 +441,6 @@ void SDCCCompilerInfo::prepareCompilerOptions()
sl.append(QPair<QString,QString>("SDCC C11","sdcc11"));
sl.append(QPair<QString,QString>("SDCC C17","sdcc17"));
sl.append(QPair<QString,QString>("SDCC C2x","sdcc2x"));
addOption(SDCC_CMD_OPT_STD, QObject::tr("Language standard (-std)"), groupName, false, true, false, "-std-", sl);
addOption(SDCC_CMD_OPT_STD, QObject::tr("Language standard (--std)"), groupName, true, false, false, "--std-", sl);
}
#endif

View File

@ -92,6 +92,9 @@ bool SDCCFileCompiler::prepareForCompile()
mExtraOutputFilesList.append("");
}
mArguments += getCCompileArguments(false);
mArguments += getCIncludeArguments();
mArguments += getProjectIncludeArguments();
QString strFileType = "C";
mCompiler = compilerSet()->CCompiler();

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>876</width>
<height>643</height>
<height>713</height>
</rect>
</property>
<property name="windowTitle">
@ -39,7 +39,14 @@
<number>0</number>
</property>
<item>
<widget class="QFontComboBox" name="cbNonAsciiFont"/>
<widget class="QFontComboBox" name="cbNonAsciiFont">
<property name="editable">
<bool>false</bool>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
@ -184,7 +191,7 @@
<bool>false</bool>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
<enum>QComboBox::AdjustToContents</enum>
</property>
<property name="fontFilters">
<set>QFontComboBox::AllFonts</set>
@ -569,7 +576,7 @@
<bool>false</bool>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
<enum>QComboBox::AdjustToContents</enum>
</property>
<property name="fontFilters">
<set>QFontComboBox::AllFonts</set>