fix(buildLisp): use full store path in FASL output pathnames

If you compiled dirA/test.lisp and dirB/test.lisp in the same library,
they'd both get written to /test.fasl and the second would overwrite the
first. Instead, use the whole store path (with / swapped for -) as the fasl
filename.

Change-Id: I4eb88b5d33757751e1f67e72ed328bd58079b1b9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/944
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
eta 2020-07-06 17:40:31 +01:00
parent 618e5540c2
commit 4dca44ac72

View file

@ -32,7 +32,7 @@ let
(let ((outfile (make-pathname :type "fasl" (let ((outfile (make-pathname :type "fasl"
:directory (or (sb-posix:getenv "NIX_BUILD_TOP") :directory (or (sb-posix:getenv "NIX_BUILD_TOP")
(error "not running in a Nix build")) (error "not running in a Nix build"))
:defaults srcfile))) :name (substitute #\- #\/ srcfile))))
(multiple-value-bind (_outfile _warnings-p failure-p) (multiple-value-bind (_outfile _warnings-p failure-p)
(compile-file srcfile :output-file outfile) (compile-file srcfile :output-file outfile)
(if failure-p (sb-posix:exit 1) (if failure-p (sb-posix:exit 1)