Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--with-native-compilation #107

Open
borkdude opened this issue Apr 30, 2021 · 9 comments
Open

--with-native-compilation #107

borkdude opened this issue Apr 30, 2021 · 9 comments

Comments

@borkdude
Copy link

Thanks a lot for providing emacs for osx!

Any change we can get builds with --with-native-compilation enabled?

@mdbergmann
Copy link

mdbergmann commented Nov 19, 2021

AFAIK this is default in Emacs master branch? So any nightly will have it.

@sfdc-slumos
Copy link

Apparently not.

error: Emacs was not compiled with native compiler support (--with-native-compilation)

Downloaded Emacs-pretest-28.0.92-universal.dmg, got error, came here, downloaded Emacs-2022-03-20_00-09-17-9b34005…-universal.dmg same error. So that was fun...

@maikol-solis
Copy link

👍

@caldwell
Copy link
Owner

I've worked on it a little so far but it's harder than you'd expect to actually ship it:

  1. Native comp requires libgccjit, which means compiling all of gcc.
  2. The resulting binary expects ld and as to be there when it runs, and complains loudly when they are not. So that means either emacs suddenly needs xcode installed, or I have to figure out if I can ship gas and gnu ld.

I've done 1, it wasn't terribly difficult. But I need to figure out 2.

@ditdb
Copy link

ditdb commented Aug 22, 2022

I anticipate the feature very much!

@claytonrcarter
Copy link

Asking w/ no knowledge of what is actually involved...

@caldwell Is it an option to disable native comp support by default, but then enable it at runtime if the host system has xcode/ld/as/etc installed? Not an ideal solution, but might it be a way forward until a better solution is found?

@e40
Copy link

e40 commented Oct 31, 2022

I've worked on it a little so far but it's harder than you'd expect to actually ship it:

1. Native comp requires libgccjit, which means compiling all of gcc.

2. The resulting binary expects `ld` and `as` to be there when it runs, and complains loudly when they are not. So that means either emacs suddenly needs xcode installed, or I have to figure out if I can ship gas and gnu ld.

I've done 1, it wasn't terribly difficult. But I need to figure out 2.

What about requiring the Command Line xcode tools to be installed? That would remove the responsibility from your side... just a thought.

@denisw
Copy link

denisw commented Apr 13, 2023

Has this become easier to accomplish now that the build is performed using Nix (https://emacsformacosx.com/about)?

@ahihi
Copy link

ahihi commented Apr 13, 2023

speaking of Nix, the emacsPgtk package (and possibly others) at nix-community/emacs-overlay comes with native-comp and is working great for me on macOS 10.14. perhaps something to take inspiration from? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants