X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fdump.lisp;h=fa44379d4056e6f4d844d93c5717d70942898d9a;hb=01488e5ddb6c8c10bc01bc9c502be1fe9de8e370;hp=491716afc3919c7edc523e92b3b6ae63fabec67d;hpb=0d2bb0b292731fbf12d89aad2d28ea98a335d82b;p=sbcl.git diff --git a/src/compiler/dump.lisp b/src/compiler/dump.lisp index 491716a..fa44379 100644 --- a/src/compiler/dump.lisp +++ b/src/compiler/dump.lisp @@ -298,6 +298,13 @@ :if-exists :supersede :element-type 'sb!assem:assembly-unit)) (res (make-fasl-output :stream stream))) + ;; Before the actual FASL header, write a shebang line using the current + ;; runtime path, so our fasls can be executed directly from the shell. + (when *runtime-pathname* + (fasl-write-string + (format nil "#!~A --script~%" + (native-namestring *runtime-pathname* :as-file t)) + stream)) ;; Begin the header with the constant machine-readable (and ;; semi-human-readable) string which is used to identify fasl files. (fasl-write-string *fasl-header-string-start-string* stream)