This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Plug-ins on Windows
- From: Richard Henderson <rth at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: Kyle Girard <kyle at kdmanalytics dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 30 Jun 2010 16:06:35 -0700
- Subject: Re: Plug-ins on Windows
- References: <1277930326.25445.10.camel@Tak> <4C2BC93D.5030505@gmail.com>
On 06/30/2010 03:46 PM, Dave Korn wrote:
> Although we could build plugins as Windows DLLs and have GCC load them at
> runtime, if those DLLs needed to refer to anything in the main GCC executable,
> it would have to be specifically linked to import it - and imports on Windows
> have to explicitly specify the name of the DLL (or executable) they are
> imported from. That means that the plugin would need to explicitly refer to
> cc1.exe or cc1plus.exe, etc; we'd need to build separate versions of the
> plugin for each of the different GCC language compilers.
>
> (Long term, we might be able to extend the toolchain and libltdl to
> co-operate to do this kind of deferred runtime linking for us, but that's not
> imminent.)
Long term we could arrange for libbackend.a to become libbackend.dll and
have that library be used for plugins. The existing practice of linking
back into the main executable is more or less an efficiency hack that
happens to work with ELF.
r~