Added -no-compiler-subprocess option

This commit is contained in:
Justin Ethier 2021-08-17 05:04:36 -04:00
parent 99ce726ca3
commit 876a93bf39

View file

@ -984,6 +984,7 @@
; args))
(compile? #t)
(run-scm-compiler? (member "-run-scm-compiler" args))
(no-compiler-subprocess (member "-no-compiler-subprocess" args))
(cc-prog (apply string-append (collect-opt-values args "-CP")))
(cc-exec (apply string-append (collect-opt-values args "-CE")))
(cc-lib (apply string-append (collect-opt-values args "-CL")))
@ -1133,10 +1134,18 @@ Debug options:
(run-compiler non-opts append-dirs prepend-dirs))
(else
;; Generate the C file
(cond
(no-compiler-subprocess
;; Special case, we can generate .C file within this process
(run-compiler non-opts append-dirs prepend-dirs))
(else
;; 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 " ")))
(string-join args " ")))))
;; Call the C compiler
(run-external-compiler
non-opts append-dirs prepend-dirs