[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suppressing native compilation (short and long term)
From: |
Stefan Monnier |
Subject: |
Re: Suppressing native compilation (short and long term) |
Date: |
Sat, 15 Oct 2022 10:00:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> > Dumb question: can't we just run the spawned compilation processes with
>> > --no-site-file?
>> For trampolines, I guess that should work since they shouldn't depend on
>> local customizations.
> But it will potentially cause other issues, because the environment in
> which the compiling Emacs sub-process run is different from that of
> the Emacs session which triggered the compilation? So we could have
> warnings and errors in the compilation process due to stuff being
> undefined etc.? Isn't this why we do read the init files in the async
> sub-process which performs the compilation?
Yes, when compiling actual ELisp files. I'm talking about compiling the
trampolines: that's different because it's just compiling a fixed chunk
of code *we* write.
>> Of course, a tempting alternative is to resort to
>> "binary hacking", i.e. compile *one* template-trampoline and then
>> generate all every other trampoline by copying that template and
>> patching the right "stuff" into it. That would save us from running the
>> compiler to generate the trampolines (i.e. it would let us behave
>> correctly on Windows even when GCC/libgccjit is not found at run time),
>> but it would force us to write architecture-dependent code to patch the
>> binary template.
>
> I don't think we should depend on architecture-dependent code. It
> would mean we don't support new platforms until someone writes such
> code for them, for starters. It's against our development tendencies
> for the past 10 years at least.
I know, I know. From a technical point of view, it's The Right Thing to
do, I think, tho: it will eliminate all the other issues surrounding
trampolines (e.g. disk space to store trampolines, dependence on
libgccjit for the creation of those trampolines, fork bombs) and will be
much more efficient both in CPU time and memory use (we don't care too
much, because trampolines are hopefully not too frequents, so we live
with them being quite inefficient in the time to create them (and set
them up, via dyn-linking) and in their memory use).
But yes, the architecture-dependence is a serious problem, which is why
we've so far avoided that solution.
Stefan
- Re: Suppressing native compilation (short and long term), (continued)
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/15
- Re: Suppressing native compilation (short and long term), Lars Ingebrigtsen, 2022/10/16
- Re: Suppressing native compilation (short and long term), Liliana Marie Prikler, 2022/10/16
- Re: Suppressing native compilation (short and long term), Stefan Monnier, 2022/10/16
- Re: Suppressing native compilation (short and long term), Lars Ingebrigtsen, 2022/10/16
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/19
- Re: Suppressing native compilation (short and long term), Eli Zaretskii, 2022/10/14
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/14
- Re: Suppressing native compilation (short and long term), Stefan Monnier, 2022/10/14
- Re: Suppressing native compilation (short and long term), Eli Zaretskii, 2022/10/15
- Re: Suppressing native compilation (short and long term),
Stefan Monnier <=
- Re: Suppressing native compilation (short and long term), Lynn Winebarger, 2022/10/15
- Re: Suppressing native compilation (short and long term), Eli Zaretskii, 2022/10/15
- Re: Suppressing native compilation (short and long term), Lynn Winebarger, 2022/10/16
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/17
- Re: Suppressing native compilation (short and long term), Lynn Winebarger, 2022/10/18
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/19
- Re: Suppressing native compilation (short and long term), Liliana Marie Prikler, 2022/10/15
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/15
- Re: Suppressing native compilation (short and long term), Stefan Monnier, 2022/10/15
- Re: Suppressing native compilation (short and long term), Andrea Corallo, 2022/10/17