Re: Regression when building static libraries with MSVC
Bram Moolenaar <[email protected]> Tue, 16 Aug 2005 12:51:40 +0200
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Thore Karlsen wrote: > On Mon, 15 Aug 2005 19:50:36 +0200, Bram Moolenaar > <[email protected]> wrote: > > [...] > > >> If I put the file back to the way it was, everything builds fine. > > >This was changed half a year ago. I can't remember why this was changed > >or who suggested it... > > >From looking at the archives, it was Lars Ivar Igesund. Here is his > explanation: > > ---- > You'll have to decide, but building static D libs won't work without it > (unless I use the {onestep} option). What happens is that msvc's lib > action is preferred over D's (the one in dmd.py) because it is missing > the language prefix in the variable name. I'm not happy with other > tools messing up mine :} > ---- > > Well, he just messed up my tool to make his work. :) Lars Ivar, did you > test your patch? Did it work on your system with MSVC? > > Perhaps the prefixes should be there to prevent conflicts, but then > something else needs to be updated somewhere else to actually use the > prefixed variables. Ah, yes, that's where it came from. It's a bit of a puzzle, especially because I can't see how C_BUILDLIB_ACTION would ever be used. I think it isn't. After all, when building a library your input is object files, not C files. I think the original problem that Lars ran into is that the default recipe uses this: defer_var_names = ["BUILDLIB_ACTION", "{buildlibaction}"]) This means that the BUILDLIB_ACTION variable is checked before the buildlibaction attribute on the object files. I think that's the wrong way around: the attribute should be preferred over a global variable. What the change from Lars did was simply remove the BUILDLIB_ACTION, so that the buildlibaction attribute would be used. I'll switch the order of the defer_var_names and undo the change that Lars made. Then it should be tested, because I'm not very sure this is the final solution! -- ERROR 047: Keyboard not found. Press RETURN to continue. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html /// ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf