diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-06-08 08:50:54 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-06-08 08:50:54 +0300 |
commit | 240803cc3e1f361baf5665f91e4d0bd9576956a7 (patch) | |
tree | a0b8b9be22e35b7d93f9e5c32a968d7656979804 /doc/lispref/compile.texi | |
parent | 026afb229847f4a76890b09a196c8431fce2804d (diff) | |
download | emacs-240803cc3e1f361baf5665f91e4d0bd9576956a7.tar.gz emacs-240803cc3e1f361baf5665f91e4d0bd9576956a7.tar.bz2 emacs-240803cc3e1f361baf5665f91e4d0bd9576956a7.zip |
Document 'startup-redirect-eln-cache'
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions): Document
'startup-redirect-eln-cache'.
* etc/PROBLEMS: Fix last change.
* etc/NEWS: Mark 'startup-redirect-eln-cache' as documented.
Diffstat (limited to 'doc/lispref/compile.texi')
-rw-r--r-- | doc/lispref/compile.texi | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 6ae6755ad76..a51691bddcf 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -854,7 +854,10 @@ that the latter technique might still produce a small number of @file{*.eln} files if Emacs needs to generate @dfn{trampolines}, which are used if Lisp primitives are advised or redefined in your Lisp code that is being natively compiled. @xref{Native-Compilation Variables, -trampolines}. +trampolines}. Alternatively, you can specify that the @file{*.eln} +files are written to a non-default directory using the +@code{startup-redirect-eln-cache} function; @pxref{Native-Compilation +Functions}. @menu * Native-Compilation Functions:: Functions to natively-compile Lisp. @@ -979,6 +982,22 @@ available and can be loaded. Lisp programs that need to know up front whether native-compilation is available should use this predicate. @end defun + By default, asynchronous native compilation writes the @file{*.eln} +files it produces to a subdirectory of the first writable directory +specified by the @code{native-comp-eln-load-path} variable +(@pxref{Native-Compilation Variables}). You can change this by using +the following function in your startup files: + +@defun startup-redirect-eln-cache cache-directory +This function arranges for the asynchronous native compilation to +write the produced @file{*.eln} files to @var{cache-directory}, which +must be a single directory, a string. It also destructively modifies +@code{native-comp-eln-load-path} such that its first element is +@var{cache-directory}. If @var{cache-directory} is not an absolute +file name, it is interpreted relative to @code{user-emacs-directory} +(@pxref{Init File}). +@end defun + @node Native-Compilation Variables @section Native-Compilation Variables @cindex native-compilation variables |