On Sun, 2010-01-10 at 17:24 +1100, Ben Lippmeier wrote:
> Windows DLLs should be working now.

Huzza. Great work Ben.

So what was the solution in the end to the problem of the cross-module
inlining and making intra vs inter DLL-calls?

> To turn on the "dyn" way add the 
> string "i386-unknown-mingw32" to PlatformSupportsSharedLibs in mk/config.mk
> 
> I haven't pushed a patch to do this yet because the DLLs for the runtime 
> and libraries currently require manual installation. After building GHC 
> I've been doing a   find . -name "*.dll"  and copying all the results to 
> c:\Windows\System32. 

Right.

> I'm not sure if there is a nicer way to do this yet, does anyone know
> offhand? In any event, it'd be good to get the buildbots testing the
> "dyn" way on Windows so we can keep it working.

Management of shared libs on Windows is going to be a bit of a pain. For
the purposes of testing we will want to just modify the %PATH% to
include the lib dir containing the dlls. This should be enough for the
testsuite, to ensure no regressions.

Ian: could you look at this? We'll want all the dlls installed into the
ghc lib dir I think (or a subdir if you prefer). Then the testsuite on
Windows would need to add that directory to the %PATH% so that
executables generated by ghc will be able to find the dlls.

Doing things properly will require more work. As Andrew says, Windows
doesn't use DLLs in quite the same way as shared libs on Unix. As Neil
says we'll most likely have to stick to using static libs by default and
using DLLs will be an extra explicit step people do for deployment.

The best option is likely going to be making packages into Win32
assemblies (using GUIDs and xml manifests). These can be installed into
a subdir of a program installation tree, or they can be installed into a
system-wide "SxS" location. The system wide thing allows any program to
depend on them by specifying the GUID in their xml manifest. The
downside is that only root can install things into the shared global SxS
area so it's not as general as -rpath on ELF platforms.

> After doing a manual install, all the "dyn" tests in the testsuite run 
> fine for me. A stripped "hello world" executable is about 10k.

Excellent.

Duncan

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to