Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


On 01/19/2016 11:46 PM, Bjoern Michaelsen wrote:
On Tue, Jan 19, 2016 at 03:38:32PM +0100, Stephan Bergmann wrote:
There's two approaches to this ugly problem.  One is as above, with the
downside of increasing the number of global symbols.  The other is to link a
Library's objects directly into a CppunitTest library via
gb_CppunitTest_use_library_objects.  The downside there is that you need
typically duplicate all the Library_*.mk's gb_Library_set/use/whatever...
calls as gb_CppunitTest_... calls in the CppunitTest_*.mk.

Both approaches suck.

True. It was "Good Enough"(tm) for the time being "Back Then"[1], but we have
much more tests now. I wonder if we should consider something like creating a
second "shadow" library that exports all symbols, but doesnt get build by
default. Thus e.g. the stuff in sw/Library_sw.mk would create _two_ targets:

  ./instdir/program/libswlo.so
  ./workdir/LinkTarget/libswlo_tests.so

There can be cases where both libraries end up in the process (like other libraries needing the first one, or the first one being dlopen'ed). That could cause problems with duplicated static data and symbols exported multiple times, but both those problems are no different with the current second approach above.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.