David Malcolm <dmalc...@redhat.com> writes: > As I understand it, Emacs is using libgccjit to do ahead-of-time > compilation, presumably compiling the optimized ELisp code to machine > code as a shared library.
Correct. > Is Emacs using gcc_jit_context_compile_to_file with > GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY, or is it doing something more > complicated? Yes. (Sorry, I forgot to CC Andrea; he sent me here :-)). > If that's what it's doing, you might want to take a look > at playback::context::compile in gcc/jit-playback.cc (and try stepping > through it in the debugger). In particular, the > playback::compile_to_file::postprocess implementation of the > playback::context::postprocess vfunc is responsible for taking a .s in > a tempdir and turning it into the desired output. Perhaps there's some > macOS-specific special-casing needed there? > > You might also find it useful to look at the overview of how > libgccjit's internals here: > https://gcc.gnu.org/onlinedocs/jit/internals/index.html#overview-of-code-structure > > Hope this is helpful Yes it is. Thanks, David!