~ chicken-core (chicken-5) 90b57243dbf25a2b0e32114746d593a8599e1528
commit 90b57243dbf25a2b0e32114746d593a8599e1528 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Tue Nov 19 11:52:34 2019 +0100 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Sun Nov 24 15:04:33 2019 +1300 Disallow using -c option in csc with multiple files. Invoking csc with -c and multiple Scheme or C input files results in any explicit output filenames given being ignored, since there is an ambiguity for which object file the target filename applies. C compilers disallow this altogether, so we follow suit. See also #1655 for more information. Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/csc.scm b/csc.scm index 60272816..be3e6ad2 100644 --- a/csc.scm +++ b/csc.scm @@ -570,6 +570,11 @@ EOF (when show-libs (print* (linker-libraries) #\space)) (newline) (exit) ) + (when (and compile-only + (> (+ (length scheme-files) + (length c-files)) + 1)) + (stop "the `-c' option cannot be used in combination with multiple input files")) (cond ((null? scheme-files) (when (and (null? c-files) (null? object-files))Trap