Add the --color and --no-utf8 options to cl65 which will pass it to the tools
that understand it.
This commit is contained in:
@@ -34,7 +34,7 @@ and other things.
|
|||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Usage: cl65 [options] file [...]
|
Usage: cl65 [options] file [...]
|
||||||
Short options:
|
Short options:
|
||||||
-c Compile and assemble but don't link
|
-c Compile and assemble, but don't link
|
||||||
-d Debug mode
|
-d Debug mode
|
||||||
-g Add debug info
|
-g Add debug info
|
||||||
-h Help (this text)
|
-h Help (this text)
|
||||||
@@ -55,10 +55,10 @@ Short options:
|
|||||||
-L path Specify a library search path
|
-L path Specify a library search path
|
||||||
-Ln name Create a VICE label file
|
-Ln name Create a VICE label file
|
||||||
-O Optimize code
|
-O Optimize code
|
||||||
-Oi Optimize code, inline more code
|
-Oi Optimize code, inline runtime functions
|
||||||
-Or Optimize code, honour the register keyword
|
-Or Optimize code, honour the register keyword
|
||||||
-Os Optimize code, inline standard functions
|
-Os Optimize code, inline known C functions
|
||||||
-S Compile but don't assemble and link
|
-S Compile, but don't assemble and link
|
||||||
-T Include source as comment
|
-T Include source as comment
|
||||||
-V Print the version number
|
-V Print the version number
|
||||||
-W name[,...] Suppress compiler warnings
|
-W name[,...] Suppress compiler warnings
|
||||||
@@ -81,8 +81,9 @@ Long options:
|
|||||||
--code-label name Define and export a CODE segment label
|
--code-label name Define and export a CODE segment label
|
||||||
--code-name seg Set the name of the CODE segment
|
--code-name seg Set the name of the CODE segment
|
||||||
--codesize x Accept larger code by factor x
|
--codesize x Accept larger code by factor x
|
||||||
|
--color [on|auto|off] Color diagnostics (default: auto)
|
||||||
--config name Use linker config file
|
--config name Use linker config file
|
||||||
--cpu type Set cpu type
|
--cpu type Set CPU type
|
||||||
--create-dep name Create a make dependency file
|
--create-dep name Create a make dependency file
|
||||||
--create-full-dep name Create a full make dependency file
|
--create-full-dep name Create a full make dependency file
|
||||||
--data-label name Define and export a DATA segment label
|
--data-label name Define and export a DATA segment label
|
||||||
@@ -101,8 +102,9 @@ Long options:
|
|||||||
--mapfile name Create a map file
|
--mapfile name Create a map file
|
||||||
--memory-model model Set the memory model
|
--memory-model model Set the memory model
|
||||||
--module Link as a module
|
--module Link as a module
|
||||||
--module-id id Specify a module id for the linker
|
--module-id id Specify a module ID for the linker
|
||||||
--no-target-lib Don't link the target library
|
--no-target-lib Don't link the target library
|
||||||
|
--no-utf8 Disable use of UTF-8 in diagnostics
|
||||||
--o65-model model Override the o65 model
|
--o65-model model Override the o65 model
|
||||||
--obj file Link this object file
|
--obj file Link this object file
|
||||||
--obj-path path Specify an object file search path
|
--obj-path path Specify an object file search path
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
/* common */
|
/* common */
|
||||||
#include "attrib.h"
|
#include "attrib.h"
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
|
#include "consprop.h"
|
||||||
#include "filetype.h"
|
#include "filetype.h"
|
||||||
#include "fname.h"
|
#include "fname.h"
|
||||||
#include "mmodel.h"
|
#include "mmodel.h"
|
||||||
@@ -858,6 +859,7 @@ static void Usage (void)
|
|||||||
" --code-label name\t\tDefine and export a CODE segment label\n"
|
" --code-label name\t\tDefine and export a CODE segment label\n"
|
||||||
" --code-name seg\t\tSet the name of the CODE segment\n"
|
" --code-name seg\t\tSet the name of the CODE segment\n"
|
||||||
" --codesize x\t\t\tAccept larger code by factor x\n"
|
" --codesize x\t\t\tAccept larger code by factor x\n"
|
||||||
|
" --color [on|auto|off]\t\tColor diagnostics (default: auto)\n"
|
||||||
" --config name\t\t\tUse linker config file\n"
|
" --config name\t\t\tUse linker config file\n"
|
||||||
" --cpu type\t\t\tSet CPU type\n"
|
" --cpu type\t\t\tSet CPU type\n"
|
||||||
" --create-dep name\t\tCreate a make dependency file\n"
|
" --create-dep name\t\tCreate a make dependency file\n"
|
||||||
@@ -880,6 +882,7 @@ static void Usage (void)
|
|||||||
" --module\t\t\tLink as a module\n"
|
" --module\t\t\tLink as a module\n"
|
||||||
" --module-id id\t\tSpecify a module ID for the linker\n"
|
" --module-id id\t\tSpecify a module ID for the linker\n"
|
||||||
" --no-target-lib\t\tDon't link the target library\n"
|
" --no-target-lib\t\tDon't link the target library\n"
|
||||||
|
" --no-utf8\t\t\tDisable use of UTF-8 in diagnostics\n"
|
||||||
" --o65-model model\t\tOverride the o65 model\n"
|
" --o65-model model\t\tOverride the o65 model\n"
|
||||||
" --obj file\t\t\tLink this object file\n"
|
" --obj file\t\t\tLink this object file\n"
|
||||||
" --obj-path path\t\tSpecify an object file search path\n"
|
" --obj-path path\t\tSpecify an object file search path\n"
|
||||||
@@ -1028,6 +1031,20 @@ static void OptConfig (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptColor(const char* Opt, const char* Arg)
|
||||||
|
/* Handle the --color option */
|
||||||
|
{
|
||||||
|
ColorMode Mode = CP_Parse (Arg);
|
||||||
|
if (Mode == CM_INVALID) {
|
||||||
|
Error ("Invalid argument to %s: %s", Opt, Arg);
|
||||||
|
} else {
|
||||||
|
CmdAddArg2 (&CA65, "--color", Arg);
|
||||||
|
CmdAddArg2 (&LD65, "--color", Arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
|
static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
/* Handle the --cpu option */
|
/* Handle the --cpu option */
|
||||||
{
|
{
|
||||||
@@ -1236,6 +1253,16 @@ static void OptNoTargetLib (const char* Opt attribute ((unused)),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptNoUtf8 (const char* Opt attribute ((unused)),
|
||||||
|
const char* Arg attribute ((unused)))
|
||||||
|
/* Handle the --no-utf8 option */
|
||||||
|
{
|
||||||
|
CmdAddArg (&CA65, "--no-utf8");
|
||||||
|
CmdAddArg (&LD65, "--no-utf8");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptO65Model (const char* Opt attribute ((unused)), const char* Arg)
|
static void OptO65Model (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
/* Handle the --o65-model option */
|
/* Handle the --o65-model option */
|
||||||
{
|
{
|
||||||
@@ -1428,6 +1455,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--code-label", 1, OptCodeLabel },
|
{ "--code-label", 1, OptCodeLabel },
|
||||||
{ "--code-name", 1, OptCodeName },
|
{ "--code-name", 1, OptCodeName },
|
||||||
{ "--codesize", 1, OptCodeSize },
|
{ "--codesize", 1, OptCodeSize },
|
||||||
|
{ "--color", 1, OptColor },
|
||||||
{ "--config", 1, OptConfig },
|
{ "--config", 1, OptConfig },
|
||||||
{ "--cpu", 1, OptCPU },
|
{ "--cpu", 1, OptCPU },
|
||||||
{ "--create-dep", 1, OptCreateDep },
|
{ "--create-dep", 1, OptCreateDep },
|
||||||
@@ -1450,6 +1478,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--module", 0, OptModule },
|
{ "--module", 0, OptModule },
|
||||||
{ "--module-id", 1, OptModuleId },
|
{ "--module-id", 1, OptModuleId },
|
||||||
{ "--no-target-lib", 0, OptNoTargetLib },
|
{ "--no-target-lib", 0, OptNoTargetLib },
|
||||||
|
{ "--no-utf8", 0, OptNoUtf8 },
|
||||||
{ "--o65-model", 1, OptO65Model },
|
{ "--o65-model", 1, OptO65Model },
|
||||||
{ "--obj", 1, OptObj },
|
{ "--obj", 1, OptObj },
|
||||||
{ "--obj-path", 1, OptObjPath },
|
{ "--obj-path", 1, OptObjPath },
|
||||||
|
|||||||
Reference in New Issue
Block a user