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

Allow setting driver options via a customizable variable #20

Conversation

antifuchs
Copy link
Contributor

This PR addresses GNU Emacs bug#42761, adding a variable for passing driver options to libgccjit.

Those are necessary for Darwin at least, where the linker does not understand the LINKER_FLAGS environment variable.

Inclusion of this patch is pending copyright assignment paperwork (in progress!)

Add a customizable variable for driver options (such as linker flags)
to pass to libgccjit (Bug #42761).

* lisp/emacs-lisp/comp.el (comp-native-driver-options): New
customization variable.
* src/comp.c: Use comp-native-driver-options to set libgccjit's driver
options, if supported on the library's ABI version.
Ensure the variable is set to the value that was customized in the
parent process in child compilation processes, also.
Otherwise, this would break async compilation with a merely
semi-visible error message.
@antifuchs antifuchs changed the base branch from master to feature/native-comp August 16, 2020 17:00
* Instead of conditionalizing on the wrong preprocessor flag, now use
  the right one: LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option

* Also perform the driver-option-adding step on win NT, but only if
  the function is non-NULL.

* Make the function declaration for add_driver_options non-old-style.
@skangas
Copy link
Contributor

skangas commented Aug 19, 2020

Emacs does not use GitHub; this is just a mirror. To get your patch noticed, please send it to bug-gnu-emacs@gnu.org with a summary of your changes. You could create a patch using the command 'git format-patch -1' and attach the resulting file to your email.

@antifuchs
Copy link
Contributor Author

Yep, feel free to close this PR - I'm using this entry only as a reference point to push my branch / reference it in a nixpkgs/emacs-overlay patch for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42761.

@antifuchs antifuchs closed this Aug 21, 2020
flatwhatson pushed a commit to flatwhatson/emacs that referenced this pull request Nov 23, 2020
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

Successfully merging this pull request may close these issues.

2 participants