Commit a321118a authored by LRN's avatar LRN

W32: Override libtool internal variables to produce a delay-load import library

We remove --out-implib, add --output-def (where needed), and add extra call
to dlltool to generate delay-load import library (name's the same as normal
import library, so tools/applications won't notice the change).
When application is linked to libgedit via such import library, the DLL is
only loaded when first function from it is called. This gives us time to
influence W32 runtime linker.

https://bugzilla.gnome.org/show_bug.cgi?id=727663
parent f9931fdd
......@@ -57,6 +57,17 @@ dnl check for win32 platform
AC_MSG_CHECKING([for Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --output-def -Xlinker $lib.def && $DLLTOOL --dllname $soname --def $lib.def --output-delaylib $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
cat $export_symbols >> $output_objdir/$soname.def;
fi~
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base;
$DLLTOOL --dllname $soname --def $output_objdir/$soname.def --output-delaylib $lib'
platform_win32=yes
;;
*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment