;; to compile the special init.ll file (which needs to be done on most
;; startups)
(define sys:compile-ll
(lambda (name)
(let ((print? #f))
(if (string=? (ipc:get-process-name) *impc:compiler:process*)
(let ((init-ll-string (sys:slurp-file (string-append (sys:share-dir) "/runtime/" name))))
(if (and init-ll-string (llvm:compile-ir init-ll-string))
(if print?
(begin
(print "\nCompiling ")
(print-with-colors 'blue 'default #t (print name))
(print "... ")
(print-with-colors 'green 'default #t (print "done"))
(print "\n\n"))
#t)
(begin
(print-with-colors 'red 'default #t (print "\n\nError compiling " name " IR\n\n"))
(print "This is pretty bad. Exiting...\n")
(quit 1))))))))