Merge pull request #2320 from pm100/cl65_type

bug 2319 - dont allow -t after input files given
This commit is contained in:
Bob Andrews 2024-01-08 21:59:21 +01:00 committed by GitHub
commit 1e3b063b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -261,6 +261,9 @@ different options for different files on the command line. As an example.
translates main.c with full optimization and module.c with less optimization
and debug info enabled.
Note that the target system (-t , --target) must be specified before any file
unless using the default target of c64
The type of an input file is derived from its extension:
<itemize>

View File

@ -1305,6 +1305,9 @@ static void OptStaticLocals (const char* Opt attribute ((unused)),
static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
/* Set the target system */
{
if (FirstInput) {
Error ("Target must be specified before input files");
}
Target = FindTarget (Arg);
if (Target == TGT_UNKNOWN) {
Error ("No such target system: '%s'", Arg);