On Wed, Feb 15, 2017 at 10:23 AM, Stefan Seefeld via Boost-build <boost-build@lists.boost.org> wrote:
Hi Aaron,

On 15.02.2017 11:18, Aaron Boman via Boost-build wrote:
> The "using" rule is a convenience rule:
>
> using MODULE_NAME : field1 : field 2 : ... : field9 ;
>
> The above essentially does this:
>
> import MODULE_NAME ;
> MODULE_NAME.init field1 : field2 : ... : field9 ;
>
> So, if you look at the gcc.jam module, you'll notice that its init()
> rule's signature is this:
>
> rule init ( version ? : command * : options * )
>
> Thus, the using rule would be used like this:
>
> using gcc : $(valid-gcc-module-version-string) :
> $(optional-command-to-gcc-exe) : $(options) ;
>
> Where $(options) can be something like <root>root/directory or
> <flavor>mingw.
>
> You can find the using() rule's definition in the toolset module.

thanks, but I don't think that answers any of the questions.
Specifically, my last question was about the 'version' argument to the
gcc.init() function. Is it used to identify a compiler by version ? Or
can it be an arbitrary string / discriminator I use to configure
compilers with different flags (e.g. `--std=c++11` vs. `--std=c++03`) ?

For gcc it can be an arbitrary string. If I understand the python init code correctly, which is a challenge even for me, for python it must be the version of the interpreter (ie it checks that it matches).

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail