[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finalizing 'inhibit-automatic-native-compilation'

From: Eli Zaretskii
Subject: Re: Finalizing 'inhibit-automatic-native-compilation'
Date: Fri, 17 Feb 2023 16:17:15 +0200

> From: Andrea Corallo <akrl@sdf.org>
> Cc: aymeric.agon@yandex.com,  spwhitton@spwhitton.name,
>   monnier@iro.umontreal.ca,  emacs-devel@gnu.org,  larsi@gnus.org,
>   rlb@defaultvalue.org
> Date: Fri, 17 Feb 2023 10:16:38 +0000
> Eli Zaretskii <eliz@gnu.org> writes:
> > Andrea, I think you can now merge this branch to emacs-29 when you
> > have time, and let's take it from there.
> >
> > Thanks.
> Done now with d6e4f243720.

Thanks.  I've installed a few updates to the docs, please take a look
and tell me if I made any mistakes.

I have a question about this code from comp.el:

  (defun comp--trampoline-abs-filename (subr-name)
    "Return the absolute filename for a trampoline for SUBR-NAME."
     with dirs = (if (stringp native-comp-enable-subr-trampolines)
                     (list native-comp-enable-subr-trampolines)
                   (if native-compile-target-directory
                       (list (expand-file-name comp-native-version-dir
     with rel-filename = (comp-trampoline-filename subr-name)
     for dir in dirs
     for abs-filename = (expand-file-name rel-filename dir)
     unless (file-exists-p dir)
       do (ignore-errors
            (make-directory dir t)
            (cl-return abs-filename))
     when (file-writable-p abs-filename)
       do (cl-return abs-filename)
     ;; Default to some temporary directory if no better option was
     ;; found.
     finally (cl-return
               (make-temp-file-internal (file-name-sans-extension rel-filename)
                                        0 ".eln" nil)

This seems to use native-comp-enable-subr-trampolines, if it is a
string, without expanding it relative to anything, which AFAIU means
it will be interpreted relative to the current buffer's
default-directory.  Is that indeed so, and if so, should we perhaps
interpret it relative to invocation-directory, like we do with
native-comp-eln-load-path?  Because which buffer is current when
trampoline compilation happens is anyone's guess, especially if that
happens in a sub-process.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]