From 67384621bc89641714bf7e40f3b6b664b9a68400 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 7 Sep 2021 07:45:50 -0400 Subject: [PATCH] Issue #481 - Exit if scm->c compilation fails --- cyclone.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cyclone.scm b/cyclone.scm index 30f26569..5e6d2c2a 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -1142,10 +1142,11 @@ Debug options: ;; Normal path is to run another instance of cyclone to generate ;; the .C file. This lets us immediately free those resources once ;; the Scheme compilation is done. - (system - (string-append - (calling-program) " -run-scm-compiler " - (string-join args " "))))) + (when (not (zero? (system + (string-append + (calling-program) " -run-scm-compiler " + (string-join args " "))))) + (exit 1)))) ;; Call the C compiler (run-external-compiler non-opts append-dirs prepend-dirs