>From dd7e161729b883fb384b146add2665bd5b0b9f6d Mon Sep 17 00:00:00 2001 From: Evan Hanson
Date: Sat, 9 Jun 2018 08:42:51 +1200 Subject: [PATCH 2/6] Wait until after compilation has finished to search for linked objects This just makes the main `run' procedure in csc.scm read more clearly, by waiting until after `run-compilation' has finished and the `compile-only' flag has been checked before doing anything related to linking. --- csc.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csc.scm b/csc.scm index 59ac83f2..9bdba68b 100644 --- a/csc.scm +++ b/csc.scm @@ -555,9 +555,6 @@ EOF (when show-libs (print* (linker-libraries) #\space)) (newline) (exit) ) - (when (pair? linked-extensions) - (set! object-files ; add objects from linked extensions - (append (filter-map find-object-file linked-extensions) object-files))) (cond ((null? scheme-files) (when (and (null? c-files) (null? object-files)) @@ -576,6 +573,9 @@ EOF (unless translate-only (run-compilation) (unless compile-only + (when (pair? linked-extensions) + (set! object-files ; add objects from linked extensions + (append (filter-map find-object-file linked-extensions) object-files))) (when (member target-filename scheme-files) (fprintf (current-error-port) "Warning: output file will overwrite source file `~A' - renaming source to `~A.old'~%" -- 2.11.0