" -V\t\t\t\tPrint the version number\n"
" -W name[,...]\t\t\tSuppress compiler warnings\n"
" -Wa options\t\t\tPass options to the assembler\n"
+ " -Wc options\t\t\tPass options to the compiler\n"
" -Wl options\t\t\tPass options to the linker\n"
"\n"
"Long options:\n"
" --bin-include-dir dir\t\tSet an assembler binary include directory\n"
" --bss-label name\t\tDefine and export a BSS segment label\n"
" --bss-name seg\t\tSet the name of the BSS segment\n"
+ " --cc-args options\t\tPass options to the compiler\n"
" --cfg-path path\t\tSpecify a config file search path\n"
" --check-stack\t\t\tGenerate stack overflow checks\n"
" --code-label name\t\tDefine and export a CODE segment label\n"
+static void OptCCArgs (const char* Opt attribute ((unused)), const char* Arg)
+/* Pass arguments to the compiler */
+{
+ CmdAddArgList (&CC65, Arg);
+}
+
+
+
static void OptCfgPath (const char* Opt attribute ((unused)), const char* Arg)
/* Config file search path (linker) */
{
{ "--bin-include-dir", 1, OptBinIncludeDir },
{ "--bss-label", 1, OptBssLabel },
{ "--bss-name", 1, OptBssName },
+ { "--cc-args", 1, OptCCArgs },
{ "--cfg-path", 1, OptCfgPath },
{ "--check-stack", 0, OptCheckStack },
{ "--code-label", 1, OptCodeLabel },
if (Arg[2] == 'a' && Arg[3] == '\0') {
/* -Wa: Pass options to assembler */
OptAsmArgs (Arg, GetArg (&I, 3));
+ } else if (Arg[2] == 'c' && Arg[3] == '\0') {
+ /* -Wc: Pass options to compiler */
+ OptCCArgs (Arg, GetArg (&I, 3));
} else if (Arg[2] == 'l' && Arg[3] == '\0') {
/* -Wl: Pass options to linker */
OptLdArgs (Arg, GetArg (&I, 3));