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")); 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 // C++ Language Standards
sl.clear(); sl.clear();
@ -441,6 +441,6 @@ void SDCCCompilerInfo::prepareCompilerOptions()
sl.append(QPair<QString,QString>("SDCC C11","sdcc11")); sl.append(QPair<QString,QString>("SDCC C11","sdcc11"));
sl.append(QPair<QString,QString>("SDCC C17","sdcc17")); sl.append(QPair<QString,QString>("SDCC C17","sdcc17"));
sl.append(QPair<QString,QString>("SDCC C2x","sdcc2x")); 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 #endif

View File

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

View File

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