Boost logo

Boost-Build :

From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-06-05 09:40:04


Vladimir Prus <ghost_at_[hidden]> writes:

>> It seems to me that your case is one which cannot be automatically
>> solved without ambiguity.
>
> I realize it's not the easiest case to deal with. However, it must be dealt
> with something.

The way you deal with cases like this one is by explicitly specifying
intermediate targets, which cuts down the search space. The
complexity of the search space in your problem is quite astounding,
and solutions are possible... but they *are* ambiguous, as shown by
the output of my algorithm, which shows three solutions with cost 9:

================================================================================
1.EST_EXE(7107_at_9)[OBJ* -> EST_EXE]
4.OBJ(2805_at_8)[CPP -> OBJ]
4.CPP(63_at_7)[None]
3.CPP(20_at_4)[None]
2.CPP(8_at_2)[ECPP -> CPP,CPP]
1.ECPP(2_at_1)[None]

1.CPP(0_at_1)[None]

1.CPP(5_at_2)[NM_ASM -> CPP,STATIC_DATA] siblings [1.STATIC_DATA(6_at_2)]
1.NM_ASM(1_at_1)[None]

================================================================================
================================================================================
1.EST_EXE(5940_at_9)[OBJ* -> EST_EXE]
4.OBJ(2592_at_8)[CPP -> OBJ]
4.CPP(60_at_7)[None]
2.CPP(14_at_4)[None]
1.CPP(5_at_2)[NM_ASM -> CPP,STATIC_DATA] siblings [1.STATIC_DATA(6_at_2)]
1.NM_ASM(1_at_1)[None]

1.CPP(0_at_1)[None]

2.CPP(8_at_2)[ECPP -> CPP,CPP]
1.ECPP(2_at_1)[None]

================================================================================
================================================================================
1.EST_EXE(8984_at_9)[OBJ* -> EST_EXE]
4.OBJ(1603_at_8)[CPP -> OBJ]
4.CPP(145_at_7)[None]
3.CPP(21_at_5)[None]
2.CPP(8_at_2)[ECPP -> CPP,CPP]
1.ECPP(2_at_1)[None]

1.CPP(5_at_2)[NM_ASM -> CPP,STATIC_DATA] siblings [1.STATIC_DATA(6_at_2)]
1.NM_ASM(1_at_1)[None]

1.CPP(0_at_1)[None]

================================================================================

> For example NM_OBJ <- NM_ASM transformation can be
> disabled when creatin EST_EXE target (using generator requirements)
>
> The case with NM_ASM <- CPP <- ECPP is harder. I'd really like to reuse the
> NM_ASM <- CPP transformation already defined. It could be possible to
> specify that STATIC_DATA <- NM_ASM <- CPP chain is usable only when processing
> target of ECPP type and main target type is EST.EXE.

I really don't understand any of this. Is it reasonable for a user to
expect the system to figure out exactly what she's after in a case
like this?

> Not sure if this fits in your algorithm, though. Do you have any proposals,
> except for making types CPP_2, NM_ASM_2 and adding NM_ASM_2 <- CPP_2
> transoframtion?

Yes, the user should explicitly specify intermediate targets.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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