mirror of
https://github.com/cc65/cc65.git
synced 2024-10-15 20:25:22 +00:00
Merge pull request #426 from MonteCarlos/master
added -E switch to cl65 for >>stop after the preprocessing stage<<.
This commit is contained in:
commit
1bbe7043e1
@ -158,6 +158,34 @@ static char* TargetLib = 0;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* Credential functions */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void DisableAssembling (void)
|
||||||
|
{
|
||||||
|
DoAssemble = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void DisableLinking (void)
|
||||||
|
{
|
||||||
|
DoLink = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void DisableAssemblingAndLinking (void)
|
||||||
|
{
|
||||||
|
DisableAssembling ();
|
||||||
|
DisableLinking ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Command structure handling */
|
/* Command structure handling */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -706,6 +734,7 @@ static void Usage (void)
|
|||||||
" -C name\t\t\tUse linker config file\n"
|
" -C name\t\t\tUse linker config file\n"
|
||||||
" -Cl\t\t\t\tMake local variables static\n"
|
" -Cl\t\t\t\tMake local variables static\n"
|
||||||
" -D sym[=defn]\t\t\tDefine a preprocessor symbol\n"
|
" -D sym[=defn]\t\t\tDefine a preprocessor symbol\n"
|
||||||
|
" -E\t\t\t\tStop after the preprocessing stage\n"
|
||||||
" -I dir\t\t\tSet a compiler include directory path\n"
|
" -I dir\t\t\tSet a compiler include directory path\n"
|
||||||
" -L path\t\t\tSpecify a library search path\n"
|
" -L path\t\t\tSpecify a library search path\n"
|
||||||
" -Ln name\t\t\tCreate a VICE label file\n"
|
" -Ln name\t\t\tCreate a VICE label file\n"
|
||||||
@ -1398,8 +1427,7 @@ int main (int argc, char* argv [])
|
|||||||
|
|
||||||
case 'S':
|
case 'S':
|
||||||
/* Dont assemble and link the created files */
|
/* Dont assemble and link the created files */
|
||||||
DoAssemble = 0;
|
DisableAssemblingAndLinking ();
|
||||||
DoLink = 0;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T':
|
case 'T':
|
||||||
@ -1412,16 +1440,34 @@ int main (int argc, char* argv [])
|
|||||||
OptVersion (Arg, 0);
|
OptVersion (Arg, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'E':
|
||||||
|
/* Forward -E to compiler */
|
||||||
|
CmdAddArg (&CC65, Arg);
|
||||||
|
DisableAssemblingAndLinking ();
|
||||||
|
break;
|
||||||
|
|
||||||
case 'W':
|
case 'W':
|
||||||
if (Arg[2] == 'a' && Arg[3] == '\0') {
|
/* avoid && with'\0' in if clauses */
|
||||||
|
if (Arg[3] == '\0') {
|
||||||
|
switch (Arg[2]) {
|
||||||
|
case 'a':
|
||||||
/* -Wa: Pass options to assembler */
|
/* -Wa: Pass options to assembler */
|
||||||
OptAsmArgs (Arg, GetArg (&I, 3));
|
OptAsmArgs (Arg, GetArg (&I, 3));
|
||||||
} else if (Arg[2] == 'c' && Arg[3] == '\0') {
|
break;
|
||||||
/* -Wc: Pass options to compiler */
|
case 'c':
|
||||||
|
/* -Wc: Pass options to compiler
|
||||||
|
** Remember -Wc sub arguments in cc65 arg struct
|
||||||
|
*/
|
||||||
OptCCArgs (Arg, GetArg (&I, 3));
|
OptCCArgs (Arg, GetArg (&I, 3));
|
||||||
} else if (Arg[2] == 'l' && Arg[3] == '\0') {
|
break;
|
||||||
|
case 'l':
|
||||||
/* -Wl: Pass options to linker */
|
/* -Wl: Pass options to linker */
|
||||||
OptLdArgs (Arg, GetArg (&I, 3));
|
OptLdArgs (Arg, GetArg (&I, 3));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
UnknownOption (Arg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Anything else: Suppress warnings (compiler) */
|
/* Anything else: Suppress warnings (compiler) */
|
||||||
CmdAddArg2 (&CC65, "-W", GetArg (&I, 2));
|
CmdAddArg2 (&CC65, "-W", GetArg (&I, 2));
|
||||||
@ -1430,7 +1476,7 @@ int main (int argc, char* argv [])
|
|||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
/* Don't link the resulting files */
|
/* Don't link the resulting files */
|
||||||
DoLink = 0;
|
DisableLinking ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
|
Loading…
Reference in New Issue
Block a user