From 555282497c3ecf8b313d87d5973093af19c35bd5 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sat, 30 May 2020 21:03:15 +0200
Subject: [PATCH] Removed --lib option from cl65.
The general approach of cl65 when generating the command lines to be executed is to first put options and the put files. However, this doesn't work well with the --lib option which would rather need to be put when libraries in general are put. I opted to not add this special behavior to cl65 as
* the use case for the --lib option is _VERY_ specific
* cl65 is after all a wrapper for ordinary use cases
---
doc/cl65.sgml | 1 -
src/cl65/main.c | 10 ----------
2 files changed, 11 deletions(-)
diff --git a/doc/cl65.sgml b/doc/cl65.sgml
index 989dce702..f00856bda 100644
--- a/doc/cl65.sgml
+++ b/doc/cl65.sgml
@@ -94,7 +94,6 @@ Long options:
--help Help (this text)
--include-dir dir Set a compiler include directory path
--ld-args options Pass options to the linker
- --lib file Link this library
--lib-path path Specify a library search path
--list-targets List all available targets
--listing name Create an assembler listing file
diff --git a/src/cl65/main.c b/src/cl65/main.c
index 4a65e8729..9d536db82 100644
--- a/src/cl65/main.c
+++ b/src/cl65/main.c
@@ -807,7 +807,6 @@ static void Usage (void)
" --help\t\t\tHelp (this text)\n"
" --include-dir dir\t\tSet a compiler include directory path\n"
" --ld-args options\t\tPass options to the linker\n"
- " --lib file\t\t\tLink this library\n"
" --lib-path path\t\tSpecify a library search path\n"
" --list-targets\t\tList all available targets\n"
" --listing name\t\tCreate an assembler listing file\n"
@@ -1080,14 +1079,6 @@ static void OptLdArgs (const char* Opt attribute ((unused)), const char* Arg)
-static void OptLib (const char* Opt attribute ((unused)), const char* Arg)
-/* Library file follows (linker) */
-{
- CmdAddArg2 (&LD65, "--lib", Arg);
-}
-
-
-
static void OptLibPath (const char* Opt attribute ((unused)), const char* Arg)
/* Library search path (linker) */
{
@@ -1374,7 +1365,6 @@ int main (int argc, char* argv [])
{ "--help", 0, OptHelp },
{ "--include-dir", 1, OptIncludeDir },
{ "--ld-args", 1, OptLdArgs },
- { "--lib", 1, OptLib },
{ "--lib-path", 1, OptLibPath },
{ "--list-targets", 0, OptListTargets },
{ "--listing", 1, OptListing },