- enhancement: add compiler commandline argument for "-E" (only preprocessing)
- enhancement: auto set output suffix to ".expanded.cpp" when compiler commandline argument for "-E" is turned on - enhancement: auto set output suffix to ".s" when compiler commandline argument for "-S" is turned on
This commit is contained in:
parent
f412eedcb0
commit
a3946b6015
3
NEWS.md
3
NEWS.md
|
@ -2,6 +2,9 @@ Red Panda C++ Version 1.0.8
|
|||
- enhancement: auto complete '#undef'
|
||||
- enhancement: redesign components for compiler commandline arguments processing
|
||||
- fix: selection calculation error when editing in column mode
|
||||
- enhancement: add compiler commandline argument for "-E" (only preprocessing)
|
||||
- enhancement: auto set output suffix to ".expanded.cpp" when compiler commandline argument for "-E" is turned on
|
||||
- enhancement: auto set output suffix to ".s" when compiler commandline argument for "-S" is turned on
|
||||
|
||||
Red Panda C++ Version 1.0.7
|
||||
- change: use Shift+Enter to break line
|
||||
|
|
|
@ -4825,14 +4825,6 @@
|
|||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tab 1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tab 2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Base compiler set:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -5713,14 +5705,6 @@
|
|||
<source>C++ Includes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>All files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -5773,6 +5757,14 @@
|
|||
<source>Can't parse problem set file '%1':%2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This CPU</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not compile, stop after the preprocessing stage (-E)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RegisterModel</name>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4825,14 +4825,6 @@
|
|||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tab 1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tab 2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Base compiler set:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -5713,14 +5705,6 @@
|
|||
<source>C++ Includes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>All files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -5773,6 +5757,14 @@
|
|||
<source>Can't parse problem set file '%1':%2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This CPU</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not compile, stop after the preprocessing stage (-E)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RegisterModel</name>
|
||||
|
|
|
@ -57,6 +57,7 @@ void CompilerInfo::prepareCompilerOptions()
|
|||
|
||||
// Optimization for cpu type
|
||||
groupName = QObject::tr("Code Generation");
|
||||
addOption(CC_CMD_OPT_DEBUG_INFO, QObject::tr("Generate debugging information (-g3)"), groupName, true, true, false, "-g3");
|
||||
QList<QPair<QString,QString>> sl;
|
||||
sl.append(QPair<QString,QString>(QObject::tr("This CPU"),"native"));
|
||||
sl.append(QPair<QString,QString>("i386","i386"));
|
||||
|
@ -158,20 +159,19 @@ void CompilerInfo::prepareCompilerOptions()
|
|||
groupName = QObject::tr("Profile");
|
||||
addOption(CC_CMD_OPT_PROFILE_INFO, QObject::tr("Generate profiling info for analysis (-pg)"), groupName, true, true, true, "-pg");
|
||||
|
||||
// Output
|
||||
groupName = QObject::tr("Output");
|
||||
addOption(CC_CMD_OPT_VERBOSE_ASM, QObject::tr("Put comments in generated assembly code (-fverbose-asm)"), groupName, true, true, false, "-fverbose-asm");
|
||||
addOption(CC_CMD_OPT_ONLY_GEN_ASM_CODE, QObject::tr("Do not assemble, compile and generate the assemble code (-S)"), groupName, true, true, false, "-S");
|
||||
addOption(CC_CMD_OPT_STOP_AFTER_PREPROCESSING, QObject::tr("Do not compile, stop after the preprocessing stage (-E)"), groupName, true, true, false, "-E");
|
||||
addOption(CC_CMD_OPT_USE_PIPE, QObject::tr("Use pipes instead of temporary files during compilation (-pipe)"), groupName, true, true, false, "-pipe");
|
||||
|
||||
// Linker
|
||||
groupName = QObject::tr("Linker");
|
||||
addOption(LINK_CMD_OPT_LINK_OBJC, QObject::tr("Link an Objective C program (-lobjc)"), groupName, false, false, true, "-lobjc");
|
||||
addOption(LINK_CMD_OPT_NO_LINK_STDLIB,QObject::tr("Do not use standard system libraries (-nostdlib)"), groupName, false, false, true, "-nostdlib");
|
||||
addOption(LINK_CMD_OPT_NO_CONSOLE, QObject::tr("Do not create a console window (-mwindows)"), groupName,false, false, true, "-mwindows");
|
||||
addOption(LINK_CMD_OPT_STRIP_EXE, QObject::tr("Strip executable (-s)"), groupName, false, false, true, "-s");
|
||||
addOption(CC_CMD_OPT_DEBUG_INFO, QObject::tr("Generate debugging information (-g3)"), groupName, true, true, false, "-g3");
|
||||
|
||||
// Output
|
||||
groupName = QObject::tr("Output");
|
||||
addOption(CC_CMD_OPT_VERBOSE_ASM, QObject::tr("Put comments in generated assembly code (-fverbose-asm)"), groupName, true, true, false, "-fverbose-asm");
|
||||
addOption(CC_CMD_OPT_ONLY_GEN_ASM_CODE, QObject::tr("Do not assemble, compile and generate the assemble code (-S)"), groupName, true, true, false, "-S");
|
||||
addOption(CC_CMD_OPT_USE_PIPE, QObject::tr("Use pipes instead of temporary files during compilation (-pipe)"), groupName, true, true, false, "-pipe");
|
||||
|
||||
}
|
||||
|
||||
CompilerInfoManager::CompilerInfoManager()
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#define CC_CMD_OPT_VERBOSE_ASM "cc_cmd_opt_verbose_asm"
|
||||
#define CC_CMD_OPT_ONLY_GEN_ASM_CODE "cc_cmd_opt_only_gen_asm_code"
|
||||
#define CC_CMD_OPT_STOP_AFTER_PREPROCESSING "cc_cmd_opt_stop_after_preprocessing"
|
||||
#define CC_CMD_OPT_USE_PIPE "cc_cmd_opt_use_pipe"
|
||||
|
||||
#define COMPILER_OPTION_ON "on"
|
||||
|
|
|
@ -41,7 +41,12 @@ bool FileCompiler::prepareForCompile()
|
|||
FileType fileType = getFileType(mFilename);
|
||||
mArguments= QString(" \"%1\"").arg(mFilename);
|
||||
if (!mOnlyCheckSyntax) {
|
||||
mOutputFile = getCompiledExecutableName(mFilename);
|
||||
if (compilerSet()->getCompileOptionValue(CC_CMD_OPT_STOP_AFTER_PREPROCESSING)==COMPILER_OPTION_ON)
|
||||
mOutputFile=changeFileExt(mFilename,"expanded.cpp");
|
||||
else if (compilerSet()->getCompileOptionValue(CC_CMD_OPT_ONLY_GEN_ASM_CODE)==COMPILER_OPTION_ON)
|
||||
mOutputFile=changeFileExt(mFilename,"s");
|
||||
else
|
||||
mOutputFile = getCompiledExecutableName(mFilename);
|
||||
mArguments+=QString(" -o \"%1\"").arg(mOutputFile);
|
||||
|
||||
//remove the old file if it exists
|
||||
|
|
Loading…
Reference in New Issue