From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-15 03:09:06
I'm looking at up-to-date version of msvc.jam, and see this:
rule link ( targets + : sources * : properties * )
flags msvc.link LIBRARIES
[ common.resolve-library-files properties ] ;
I think this has two problems.
1. The 'properties' argument to 'resolve-library-files' -- should
not it be $(properties)?
2. The use of "flags". I think this is very wrong. Essentially, it will
add the result of "common.resolve-library-files" to LIBRARIES var
that is applied to *all* msvc.link invokations later. Not just for
this target, or this project, but for all. Besides, it might be
problematic performance-wise. The 'flags' rule records everything in
a single list. Calling it 10000 times (once for each target), can slow
I'd suggest this:
LIBRARIES on $(targets) = [ common.resolve-library-files $(properties) ] ;
and even that is probably too complex. What about this:
flags msvc.link LIBRARIES_MENTIONED_BY_FILE : <library-file> ;
and using LIBRARIES_MENTIONED_BY_FILE right in the action? This should take
care about conversion from V2 "virtual target" to jam "real target"
automatically, because <library-file> feature is given "dependency"
attribute. The "resolve-library-files" has the code to specifically exclude
shared libraries, but it might be no longer necessary. (Alas, there's no
comment to explain that logic -- my bad).
Say, I've just updated borland.jam to use new response files, and it passes
all tests without this "resolve-library-files" call.
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk