(declaim (optimize (debug 3)) (notinline foo bar run)) (defun foo () (/ (read) (read))) (defun bar () (foo)) (defun run () (print (bar))) (defmacro handler-case-if (boolean expression &rest error-clauses) `(if ,boolean (handler-case ,expression ,@error-clauses) (progn (print 'hi) ,expression))) (defun toplevel () (handler-case-if (not (find "--debug" *posix-argv* :test #'string=)) (run) (error (c) (format t "Usage: echo 1 2 | ~A~2%Error: ~A" (first *posix-argv*) c) (sb-ext:exit :code 1)) (sb-sys:interactive-interrupt (c) (declare (ignore c)) (sb-ext:exit :code 0)))) (defun build () (sb-ext:save-lisp-and-die "div" :executable t :toplevel #'toplevel :save-runtime-options t))