Subject: Re: bug#46256: [feature/native-comp] AOT eln files ignored if run from build tree

From: Eli Zaretskii <[email-masked]>
Date: Mon, 01 Mar 2021 07:36:23 +0200

> From: Andrea Corallo <[email-masked]>
> Cc: Andy Moreton <[email-masked]>, [email-masked]
> Date: Sun, 28 Feb 2021 21:15:03 +0000
> 
> > Does the async native compilation use temporary files, and if so, do
> > they reside in the same directory when multiple compilations are
> > running?
> 
> Yes, we rely on Fmake_temp_file_internal in Fcomp__compile_ctxt_to_file
> to decide the output filename to be passed to libgccjit when asking for
> compilation.

That shouldn't cause a problem, I think.

> There should be no conflict unless more then one process is trying to
> compile the same file

Is there a way to print to some log file the names of the files being
compiled?  Then perhaps we could catch such multiple compilations.

AFAIR, the Emacs build process divides files into several groups, and
no 2 groups include the same file.  So the top-level compilation
process cannot cause multiple compilations of the same file.  But
could it happen that compiling file A indirectly causes file B to be
compiled, because file A requires B or loads B or calls functions
declared to be in B, and there's not yet a .eln file for file B?