emacs-libvterm icon indicating copy to clipboard operation
emacs-libvterm copied to clipboard

Use `vterm-module.<architecture>.so` naming for the compiled binary

Open vishesh opened this issue 4 years ago • 0 comments

I'm using a M1 MacBook. Currently, I'm running ARM build for command line and Intel build for GUI (as that's what available currently). Starting vterm-module compiles for the right target, however once it is compiled it will just try to use that one. Which means if I do this, it won't work:

  1. Start ARM Emacs instance, which will compile vterm-module.so for ARM.
  2. Start Intel Emacs instance, which will now try to load the ARM module, and it will obviously won't work.

Or vice versa.

It isn't really a big deal as I can just switch to Intel for CLI as well, but seemed like, if just instead generate output like vterm-module-x86_64.so or vterm-module-arm64.so and require module according to current instruction set, we can potentially fix this simple scenario.

The fix I'm thinking right now is, use system-configuration output in elisp to decide the output file name and require it.

vishesh avatar Feb 04 '21 16:02 vishesh