Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-02-14 03:29:23

On Monday 13 February 2006 23:14, Mark Evans wrote:
> I am puzzled why so many toolsets do the following (where xyz is toolset
> name):
> toolset.inherit xyz : unix ;
> generators.override builtin.lib-generator : xyz.prebuilt ;
> generators.override xyz.searched-lib-generator : searched-lib-generator ;
> What motivates the override statements and what do they do? Are they
> necessary?

Here's why. There's builtin 'searched-lib-generator'. However, for Unix that
generator is not sufficient, because Unix linkers are sensitive to the order
files are specified, and some extra actions are necessary. You can take a
look at unix.jam to see the extra action.

Now, we've got two generators that can produce searched lib: builtin one, and
the one in unix.jam. Then, gcc inherits from unix, and gets yes another
generator. There are two strageries to deal with this sitations:

  - Run all generators and see if they produce exactly the same targets
  - Require user to specify priorities between generators, so that
    only one will be run

We now implement the second stragery, because it's more efficient. So, you
need to explicitly say that gcc.searched-lib-generator overrides builtin

Does this explain the situation?

- Volodya

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at