Toolset inheritance

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Toolset inheritance

Boost - Build mailing list
I am working on a new compiler toolset, call it X, which uses another
toolset, call it Y, to compile/link in order to build the same type of
targets. The only the slight differences between toolset X and toolset Y
is centered on the fact that toolset X has its own header files and
standard library, whereas toolset Y normally used the header files and
standard libraries of anothewr toolset Z. I am a little bit hazy on how
toolset inheritance works to achieve what I want to do. I understand I
can use the toolset.inherit_generators, toolset.inherit_rules and the
toolset.inherit_flags to inherit these things from Y to X. What I do not
understand is how to change something toolset X inherits from toolset Y,
such as a rule, with its actions, or a flag.

Do I just place X's own version of a toolset rule and/or its action in
toolset X's jamfile to override what is inherited from tollset Y ? If so
can I replace either the rule or its action independently of each other.

Do I just specify X's own toolset.flags invocation in X's jamfile to
override some flag X inherited from Y ?

Any help to understand how I can do this would be appreciated.

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Toolset inheritance

Boost - Build mailing list
AMDG

On 2/19/20 11:45 PM, Edward Diener via Boost-build wrote:

> I am working on a new compiler toolset, call it X, which uses another
> toolset, call it Y, to compile/link in order to build the same type of
> targets. The only the slight differences between toolset X and toolset Y
> is centered on the fact that toolset X has its own header files and
> standard library, whereas toolset Y normally used the header files and
> standard libraries of anothewr toolset Z. I am a little bit hazy on how
> toolset inheritance works to achieve what I want to do. I understand I
> can use the toolset.inherit_generators, toolset.inherit_rules and the
> toolset.inherit_flags to inherit these things from Y to X. What I do not
> understand is how to change something toolset X inherits from toolset Y,
> such as a rule, with its actions, or a flag.
>
> Do I just place X's own version of a toolset rule and/or its action in
> toolset X's jamfile to override what is inherited from tollset Y ? If so
> can I replace either the rule or its action independently of each other.
>

Yes.

> Do I just specify X's own toolset.flags invocation in X's jamfile to
> override some flag X inherited from Y ?
>

You can only add to the flags.  If you use define flags
that match the inherited flags, you will get both.
If you want to override flags, you have to exclude them
from inherit-flags.

> Any help to understand how I can do this would be appreciated.
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Toolset inheritance

Boost - Build mailing list
On 2/21/2020 9:23 PM, Steven Watanabe via Boost-build wrote:

> AMDG
>
> On 2/19/20 11:45 PM, Edward Diener via Boost-build wrote:
>> I am working on a new compiler toolset, call it X, which uses another
>> toolset, call it Y, to compile/link in order to build the same type of
>> targets. The only the slight differences between toolset X and toolset Y
>> is centered on the fact that toolset X has its own header files and
>> standard library, whereas toolset Y normally used the header files and
>> standard libraries of anothewr toolset Z. I am a little bit hazy on how
>> toolset inheritance works to achieve what I want to do. I understand I
>> can use the toolset.inherit_generators, toolset.inherit_rules and the
>> toolset.inherit_flags to inherit these things from Y to X. What I do not
>> understand is how to change something toolset X inherits from toolset Y,
>> such as a rule, with its actions, or a flag.
>>
>> Do I just place X's own version of a toolset rule and/or its action in
>> toolset X's jamfile to override what is inherited from tollset Y ? If so
>> can I replace either the rule or its action independently of each other.
>>
>
> Yes.
>
>> Do I just specify X's own toolset.flags invocation in X's jamfile to
>> override some flag X inherited from Y ?
>>
>
> You can only add to the flags.  If you use define flags
> that match the inherited flags, you will get both.
> If you want to override flags, you have to exclude them
> from inherit-flags.

Thank you, Steven !

>
>> Any help to understand how I can do this would be appreciated.
>>
>
> In Christ,
> Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build