[Libguestfs] [PATCH v6 05/41] utils: Split out cleanups into common/cleanups.

Richard W.M. Jones rjones at redhat.com
Fri Jun 16 14:58:53 UTC 2017


On Fri, Jun 16, 2017 at 03:24:55PM +0200, Pino Toscano wrote:
> On Thursday, 15 June 2017 19:05:55 CEST Richard W.M. Jones wrote:
> > Those cleanups which only depend on libc, gnulib or libxml2 are split
> > out into a separate common/cleanups directory.
> > ---
> 
> IMHO a single cleanups.c source should be enough, otherwise it's overly
> split...

I think you do need to split it.  The reason is that if the program
uses libcleanups.la but doesn't link to (eg) libxml2 then the link
will fail.  We could either force everything to link unnecessarily to
libxml2 or we can split the object files so that the libxml2
dependency is never pulled in if the main program doesn't use it.

And the same applies (but a bit less) to gnulib.  I'm not sure
anything doesn't link to gnulib though, and probably everything should
(except examples but they don't use cleanups).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list