|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-02-17 07:44:51
David Abrahams wrote:
> There seems to be a lot of code duplication in flags declarations for
> gcc.link and gcc.link-dll. That's why I had v1 go through a single
> action by default, with the ability to check the target type and
> dispatch to different action subrules if neccessary. Is that
> something we can do in v2 as well?
I am not 100% sure I understand. Do you mean if it's possible to same action,
say "gcc.link" for linking both application and shared libraries. I think
this should be possible:
generators.register-linker gcc.link : LIB OBJ : EXE : <toolset>gcc ;
generators.register-linker gcc.link-dll : OBJ : SHARED_LIB : <toolset>gcc
can become
generators.register-linker gcc.link : LIB OBJ : EXE : <toolset>gcc ;
generators.register-linker gcc.link : OBJ : SHARED_LIB : <toolset>gcc
the only problem is that "gcc.link" here is used to two purposes: identifying
the generator and naming the rule used to set up build actions. This can lead
to confusion in some code (toolset inheritance, in particular), but that's not
something hard to fix.
- Volodya
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