1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Renamed to '--no-crt-lib'

This commit is contained in:
Evgeny Vrublevsky 2018-10-18 12:54:15 +03:00 committed by Oliver Schmidt
parent 2a9bb0d8de
commit 23b5cc870e
2 changed files with 14 additions and 16 deletions

View File

@ -103,7 +103,7 @@ Long options:
--memory-model model Set the memory model
--module Link as a module
--module-id id Specify a module id for the linker
--no-rtl Don't link default runtime library
--no-crt-lib Don't link default C runtime library
--o65-model model Override the o65 model
--obj file Link this object file
--obj-path path Specify an object file search path
@ -186,9 +186,10 @@ There are a few remaining options that control the behaviour of cl65:
seem to use cc65 to develop for the C64.
<tag><tt>--no-rtl</tt></tag>
<tag><tt>--no-crt-lib</tt></tag>
This option tells the cl65 to not include default C runtime library into the list of libraries.
This option disables default runtime library of target system.
<tag><tt>-Wa options, --asm-args options</tt></tag>

View File

@ -139,7 +139,7 @@ static int Module = 0;
/* Name of the target specific runtime library */
static char* TargetLib = 0;
static int NoRTL = 0;
static int NoCrtLib = 0;
@ -415,12 +415,6 @@ static void SetTargetFiles (void)
const char* TargetName = GetTargetName (Target);
unsigned TargetNameLen = strlen (TargetName);
if (NoRTL)
{
/* Default RunTime Library is disabled */
return;
}
/* Set the library file */
TargetLib = xmalloc (TargetNameLen + 4 + 1);
memcpy (TargetLib, TargetName, TargetNameLen);
@ -498,8 +492,11 @@ static void Link (void)
CmdSetTarget (&LD65, Target);
}
/* Determine which target libraries are needed */
SetTargetFiles ();
if (!NoCrtLib)
{
/* Determine which target libraries are needed */
SetTargetFiles ();
}
/* Add all object files as parameters */
for (I = 0; I < LD65.FileCount; ++I) {
@ -819,7 +816,7 @@ static void Usage (void)
" --memory-model model\t\tSet the memory model\n"
" --module\t\t\tLink as a module\n"
" --module-id id\t\tSpecify a module ID for the linker\n"
" --no-rtl\t\t\tDon't link default runtime library\n"
" --no-crt-lib\t\t\tDon't link default C runtime library\n"
" --o65-model model\t\tOverride the o65 model\n"
" --obj file\t\t\tLink this object file\n"
" --obj-path path\t\tSpecify an object file search path\n"
@ -1175,11 +1172,11 @@ static void OptModuleId (const char* Opt attribute ((unused)), const char* Arg)
static void OptNoRTL (const char* Opt attribute ((unused)),
static void OptNoCrtLib (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Disable default runtime library */
{
NoRTL = 1;
NoCrtLib = 1;
}
@ -1386,7 +1383,7 @@ int main (int argc, char* argv [])
{ "--memory-model", 1, OptMemoryModel },
{ "--module", 0, OptModule },
{ "--module-id", 1, OptModuleId },
{ "--no-rtl", 0, OptNoRTL },
{ "--no-crt-lib", 0, OptNoCrtLib },
{ "--o65-model", 1, OptO65Model },
{ "--obj", 1, OptObj },
{ "--obj-path", 1, OptObjPath },