From: Axel S. <A....@ke...> - 2004-04-23 16:37:28
|
On Fri, Apr 23, 2004 at 03:54:18PM +0100, Duncan Coutts wrote: > Is the linker clever enough to discard stuff that is not used? I can > imagine people being a bit annoyed if their program ends up being much > bigger because it is unnecessarily linking to gtksourceview + libvte + > libglade + gconf + gnomecanvas just because they used an extra widget > from libgnomeui. a) Jens Petersen urged me several time to change to automake. That is a good idea in general and makes adding stuff much simpler. However, it's not yet clear to me if automake can be made to work with Haskell. b) Ultimately, we should use the dynamic libraries. Then it doesn't affect the size of the executable at all. > > Perhaps we can let people do either by making a gnome package that > depends on all the individual gnome modules, so you could just say > -package gnome or if you really care which packages get used you could > say -package libgnomeui. True, that is always possible. > The other thing to consider is that ghc does now automatically link in > packages if one sets the packages up properly (something to do with the > hierarchal module system). It does this if you use ghc --make or ghc -c. > If I recall correctly, the only time it doesn't is when you use ghc to > link .o files into an executable (or .a). I make packages automatically available if one sets the "auto" flag in the package description. That should only be done if the library uses hierarchical names. I think we could put that on top of the current binding. Maybe we could just change all the modules in place. That would break programs, but then, there are only very few programs out there that use gtk2hs. If we do that, the conversion to Haddock should be done as well. Axel. |