Subject: bug#58509: 29.0.50; Synchronous nativecomp

From: Andrea Corallo <[email-masked]>
Date: Sun, 23 Oct 2022 10:51:14 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Andrea Corallo <[email-masked]>
>> Cc: [email-masked], [email-masked]
>> Date: Thu, 20 Oct 2022 07:23:55 +0000
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> >> From: Andrea Corallo <[email-masked]>
>> >> Cc: [email-masked], [email-masked]
>> >> Date: Wed, 19 Oct 2022 19:31:05 +0000
>> >> 
>> >> > "do it always for trampolines in the --batch invocations"
>> >> 
>> >> So you mean identifying that we are doing a trampoline compilation and
>> >> disable the native compiler without a specific flag?
>> >
>> > Yes, but only in -batch sessions.
>> >
>> > I believe this is our logic now: if we are going to compile a
>> > trampoline, we invoke an async subprocess
>> 
>> We invoke a sync compilation for trampolines (but I think it's not
>> relevant here)
>> 
>> > with both -batch and
>> > the -no-comp-spawn options.  But if the --batch session can figure
>> > out that it's compiling a trampoline, it can automatically behave as
>> > if -no-comp-spawn was passed on the command line, no?
>> 
>> Okay so IIUC your suggestion would be to: when we identify '--batch' we
>> search for a signature in the commandline to identify the trampoline
>> compilation and set in case `comp-no-spawn'?
>
> Yes.  And if that works, my next question is: can we then remove the
> new -no-comp-spawn command-line option, or do we need it for some
> other cases?

If it works I think it should be equivalent at that point.  But at the
moment is not so trivial to identify this condition as we have no clear
marker of it.

The current invocation for compilations is just like:

emacs --batch -l sometmpfile.el

I don't know if we have some other option for adding a marker other than
the most obvious (the dedicated flag).

Best Regards

  Andrea