[Issue 4669] Unit tests do not work in libraries compiled by dmd with -lib
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 13 09:03:05 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4669
--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-13 09:02:59 PST ---
The cause is this code in 'FuncDeclaration::toObjFile':
if (multiobj && !isStaticDtorDeclaration() && !isStaticCtorDeclaration())
{ obj_append(this);
return;
}
'multiobj' is true when -lib is passed, this unittest is then deferred to be
generated later (and it *is* generated later), however it never seems to be
run.
Anyway a qujick fix is to add a check for lib generation:
if (multiobj && !global.params.lib && !isStaticDtorDeclaration() &&
!isStaticCtorDeclaration()) { }
This makes the unittest work, but I don't know if that's a proper fix.
Any backend experts know more?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list