Boost logo

Boost-Build :

Subject: Re: [Boost-build] [Boost][build] Bjam ordering source $(>) list
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-26 17:11:23


AMDG

K. Noel Belcourt wrote:
> On Jun 26, 2009, at 2:08 PM, Steven Watanabe wrote:
>
>> K. Noel Belcourt wrote:
>>> Thanks for the push, I dug in a bit more to see how sources $(>) are
>>> populated for the link action.
>>>
>>> In builtin.jam, linking-generator.generated-targets() is the place to
>>> alter what ends up in $(>), and in what order. For my problem, I
>>> separated the OBJ sources from all other sources so I could place the
>>> OBJ before STATIC_LIB, etc... The fix turned out to work beautifully
>>> as you can see here.
>>> <snip>
>>>
>>> This patch moves all objects before non-objects and retains their
>>> respective relative ordering, so as not to break the dependency
>>> ordering.
>>>
>>> Anyone think this is this worth committing to Boost.Build?
>>
>> Maybe you can use unix-linking-generator which also
>> makes sure that dependent libraries are placed in the correct order?
>
>
> That would mean that generators that don't inherit from
> unix-linking-generator wouldn't benefit from this change (e.g.
> msvc-linking-generator), but I guess that doesn't really matter.
>
> Sure, I can move it into unix.jam.

Any toolset that cares about library ordering ought to use
unix-linking-generator AFAIK, the only reason that unix.jam
exists at all is to make sure that libraries are placed in the correct
location on the command line. The logic that's already there is
opposite your patch, it finds all LIB targets and puts them after
the other sources.

In Christ,
Steven Watanabe


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