Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-05-13 05:39:55


David Abrahams wrote:

> > I'm not sure, either. More specifically, I'm not sure we'll handle
> > intel-linux-8.0 correctly. The dash would make sense of "linux" were just
> > a subvariant of <toolset>intel, but since intel on linux and windows has
> > different command line interface, I'm not sure having one toolset with
> > two subvariants makes sense.
> >
> > As for icclinux vs. intellinux -- I think I'd prefer the first, but it's
> > not very important, IMO.
>
> I realize that it's very different on different platforms, but I feel
> strongly that the platform (linux/win32) should not be part of the
> toolset name. We should have one "intel" toolset from a user's POV.
> If it needs to be dispatched to two subsidiary files, that's fine.

Since the linux/w32 differences a big, we'd still need to represent platfrom
in a number of places, e.g:

- Taget name need to include platform (e.g. icclinux and iccwin)
- Conditional requirements most likely would need to check both toolset and
platform.

The cases where you really can treat both linux and windows version as one
platform are
1. On the command line:

bjam icc

2. In the config files:

using icc : 8.0 ;

The first usage is not strictly necessary, but is nice. I have a patch now
which make "linux" subfeature of the "icc" toolset, so this usage works. The
changes to the toolset are minimal, see the attached. Some minor tweaks to V2
were also needed.

This said, I'm not exactly sure how we'll implement Intel for Win32. Dave, did
you plan one would extend msvc using the "vendor" feature? Or something else.

As for second usage: well, we can make "icc.init" forward to icclinux.init
when on linux. But it's possible that user wants to init both linux and win32
version. Should be provide some nice way, or just tell the user to resort to

using icc-linux : 8.0

?

- Volodya

 --Boundary-00=_7B1oAE5wSViorOb Content-Type: text/x-diff;
charset="koi8-r";
name="icclinux.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="icclinux.diff"

--- icclinux.jam.orig 2004-05-13 14:33:12.000000000 +0400
+++ icclinux.jam 2004-05-13 14:13:37.000000000 +0400
@@ -8,12 +8,14 @@
import feature ;
import toolset : flags ;

-feature.extend toolset : icclinux ;
+feature.extend toolset : icc ;
+feature.subfeature toolset icc : platform : : propagated link-incompatible ;
+feature.extend-subfeature toolset icc : platform : linux ;
import gcc ; # toolset.inherit icclinux : gcc ; with prohibit flag properties
-toolset.inherit-generators icclinux : gcc ;
+toolset.inherit-generators icclinux <toolset>icc <toolset-icc:platform>linux : gcc ;
toolset.inherit-flags icclinux : gcc : <inlining>off <inlining>on <inlining>full <optimization>space ;
toolset.inherit-rules icclinux : gcc ;
-feature.subfeature toolset icclinux : version : : propagated link-incompatible ;
+feature.subfeature toolset icc : version : : propagated link-incompatible ;

# Initializes the icclinux toolset
# version in mandatory
@@ -23,10 +25,10 @@
{
name ?= "icc" ;

- feature.extend-subfeature toolset icclinux : version : $(version) ;
- flags icclinux CONFIG_NAME <toolset>icclinux-$(version) : $(name) ;
- flags icclinux CONFIG_COMPILE <toolset>icclinux-$(version) : $(compile_options) ;
- flags icclinux CONFIG_LINK <toolset>icclinux-$(version) : $(link_options) ;
+ feature.extend-subfeature toolset icc : version : $(version) ;
+ flags icclinux CONFIG_NAME <toolset>icc-linux-$(version) : $(name) ;
+ flags icclinux CONFIG_COMPILE <toolset>icc-linux-$(version) : $(compile_options) ;
+ flags icclinux CONFIG_LINK <toolset>icc-linux-$(version) : $(link_options) ;
}

flags icclinux.compile OPTIONS <inlining>off : "-Ob0" ;
 --Boundary-00=_7B1oAE5wSViorOb Content-Type: text/x-diff;
charset="koi8-r";
name="build.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="build.diff"

? .build
? A.dif
? A.diff
? ChangeLog
? absolute.diff
? composite.diff
? duplicate_reporting.diff
? glob.diff
? log.txt
? out.txt
? property.diff
? targets.diff
? targets.jam.146
? targets.jam.new
Index: generators.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/build/generators.jam,v
retrieving revision 1.68
diff -u -r1.68 generators.jam
--- generators.jam 9 Jan 2004 11:55:31 -0000 1.68
+++ generators.jam 13 May 2004 10:35:01 -0000
@@ -256,14 +256,15 @@
# Returns another generator which differers from $(self) in
# - id
# - value to <toolset> feature in properties
- rule clone ( new-id : new-toolset-name )
+ rule clone ( new-id : new-toolset-properties + )
{
return [ new $(__class__) $(new-id)
: $(self.source-types)
: $(self.target-types-and-names)
- : [ property.change $(self.requirements)
- : <toolset> $(new-toolset-name)
- ]
+ # Note: this does not remove any subfeatures of <toolset>
+ # which might cause problems
+ : [ property.change $(self.requirements) : <toolset> ]
+ $(new-toolset-properties)
] ;
}

Index: property.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/build/property.jam,v
retrieving revision 1.44
diff -u -r1.44 property.jam
--- property.jam 10 Dec 2003 10:42:46 -0000 1.44
+++ property.jam 13 May 2004 10:35:01 -0000
@@ -312,7 +312,8 @@

# Returns a modified version of properties with all values of the
# given feature replaced by the given value.
-rule change ( properties * : feature value )
+# If 'value' is empty the feature will be removed
+rule change ( properties * : feature value ? )
{
local result ;
for local p in $(properties)
Index: toolset.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/build/toolset.jam,v
retrieving revision 1.22
diff -u -r1.22 toolset.jam
--- toolset.jam 20 Feb 2004 08:51:18 -0000 1.22
+++ toolset.jam 13 May 2004 10:35:01 -0000
@@ -263,8 +263,9 @@
inherit-rules $(toolset) : $(base) ;
}

-rule inherit-generators ( toolset : base )
+rule inherit-generators ( toolset properties * : base )
{
+ properties ?= <toolset>$(toolset) ;
local base-generators = [ generators.generators-for-toolset $(base) ] ;
for local g in $(base-generators)
{
@@ -285,7 +286,7 @@
}
local new-id = $(toolset)$(suffix) ;

- generators.register [ $(g).clone $(new-id) : $(toolset) ] ;
+ generators.register [ $(g).clone $(new-id) : $(properties) ] ;
}
}

 --Boundary-00=_7B1oAE5wSViorOb--


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