unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrea Corallo <akrl@sdf.org>
Cc: arthur.miller@live.com, emacs-devel@gnu.org
Subject: Re: Native compiler - passing command line options to C compiler
Date: Mon, 30 Aug 2021 18:50:39 +0300	[thread overview]
Message-ID: <83o89fj5io.fsf@gnu.org> (raw)
In-Reply-To: <xjfeeab2eil.fsf@ma.sdf.org> (message from Andrea Corallo on Mon,  30 Aug 2021 14:28:18 +0000)

> From: Andrea Corallo <akrl@sdf.org>
> Cc: arthur.miller@live.com, emacs-devel@gnu.org
> Date: Mon, 30 Aug 2021 14:28:18 +0000
> 
> > You cannot use a libgccjit.dll of a version for which Emacs was not
> > compiled, unless it is binary-compatible.  If Emacs was linked against
> > libgccjit.dll that didn't support
> > gcc_jit_context_add_command_line_option, then it would not work to
> > install a newer version of the DLL that does.
> 
> Okay, I thought on Windows worked differently and we could handle the
> case of a symbol not available at compile time but at runtime.

On Windows, we delay loading the libgccjit DLL until it is first
needed, but when it load it, we find the addresses of all the
functions we want to import from the library, and any function that is
not in the library will cause the initialization to fail.  See
init_gccjit_functions, and examine the definition of the LOAD_DLL_FN
macro.  So if someone has a libgccjit DLL without the
gcc_jit_context_add_command_line_option function, they will be unable
to use native-compilation.

Btw, since we already expect gcc_jit_context_add_command_line_option
to exist unconditionally on WINDOWSNT, I guess the test for
LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option is indeed not
needed on WINDOWSNT, because we implicitly assume it will always
succeed.  But I'd like to avoid tricky code if possible.



  parent reply	other threads:[~2021-08-30 15:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM9PR09MB49778CFA83AA6697D09ED01B96CA9@AM9PR09MB4977.eurprd09.prod.outlook.com>
2021-08-30  9:36 ` Native compiler - passing command line options to C compiler Andrea Corallo via Emacs development discussions.
2021-08-30 13:56   ` Arthur Miller
2021-08-30 14:05     ` Andrea Corallo via Emacs development discussions.
2021-08-30 11:42 ` Eli Zaretskii
2021-08-30 12:59   ` Andrea Corallo via Emacs development discussions.
2021-08-30 13:28     ` Eli Zaretskii
2021-08-30 14:28       ` Andrea Corallo via Emacs development discussions.
2021-08-30 15:00         ` Arthur Miller
2021-08-30 15:38           ` Andrea Corallo via Emacs development discussions.
2021-08-31  5:36             ` Arthur Miller
2021-08-31  8:06               ` Andrea Corallo via Emacs development discussions.
2021-08-31 13:01               ` Eli Zaretskii
2021-08-31 22:53                 ` Arthur Miller
2021-09-01 11:45                   ` Eli Zaretskii
2021-09-01 14:23                     ` Arthur Miller
2021-09-01 16:45                       ` Eli Zaretskii
2021-09-01 21:06                         ` Arthur Miller
2021-08-30 16:01           ` Eli Zaretskii
2021-08-30 15:50         ` Eli Zaretskii [this message]
2021-08-30 14:01   ` Arthur Miller
2021-08-30 14:03     ` Eli Zaretskii
2021-09-01 14:58   ` Alex Bennée
2021-09-01 15:10     ` Perry E. Metzger
2021-09-01 16:04     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o89fj5io.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=akrl@sdf.org \
    --cc=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).