emacs-devel
[Top][All Lists]
Advanced

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

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


From: Andrea Corallo
Subject: Re: Finalizing 'inhibit-automatic-native-compilation'
Date: Sat, 18 Feb 2023 21:48:55 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> 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."
>     (cl-loop
>      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
>                                              native-compile-target-directory))
>                    (comp-eln-load-path-eff)))
>      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
>             (expand-file-name
>              (make-temp-file-internal (file-name-sans-extension rel-filename)
>                                       0 ".eln" nil)
>              temporary-file-directory))))
>
> 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.
>
> Thanks.

Hi Eli,

yes your is a very good point.  I pushed c15bc91e1bf to address that,
please have a look.

Thanks

  Andrea



reply via email to

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