emacs: precompile all trampolines

This commit is contained in:
Mauricio Collares 2021-02-17 10:26:08 -03:00 committed by adisbladis
parent ad4db3f4d8
commit 2ff98c2f17
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7

@ -159,6 +159,10 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
'' + lib.optionalString (nativeComp && withNS) ''
ln -snf $out/lib/emacs/*/native-lisp $out/Applications/Emacs.app/Contents/native-lisp
'' + lib.optionalString nativeComp ''
$out/bin/emacs --batch \
-l comp --eval "(mapatoms (lambda (s) \
(when (subr-primitive-p (symbol-function s)) \
(comp-trampoline-compile s))))"
mkdir -p $out/share/emacs/native-lisp
$out/bin/emacs --batch \
--eval "(add-to-list 'comp-eln-load-path \"$out/share/emacs/native-lisp\")" \