Subject: Re: [Boost-build] Adding a toolset for a compiler
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-09-20 19:01:03
On 09/20/2018 12:25 PM, Edward Diener via Boost-build wrote:
> Given compiler 'xxx' with a command line 'xxx -c compile parameters...'
> for compiling cpp/c source to object files and a command line 'xxx link
> parameters... ' for linking object files into a library or an
> executable, what is the minimum contents of xxx.jam which are needed to
> use that jamfile as a 'toolset=xxx' on a b2 command line ? Is there some
> prorotype I can use for doing this ?
I suggest that you start with one of the simpler toolsets, like acc.
What you need is
a) An action block for each command:
- (optional) compile.c
- (optional) compile.asm
b) flags settings for <include>, <define>, <cxxflags>,
<cflags>, <linkflags>, and <archiveflags>, <library-file>,
<library-path>, <find-static-library>, <find-shared-library>.
Additional flags for the following will make the toolset
more configurable, but a prototype can get by without them:
<optimization>, <threading>, <profiling>, <debug-symbols>,
<inlining>, <warnings>, <exception-handling>, <rtti>, <cxxstd>,
<address-model>, <architecture>, <visibility>.
c) An init rule which can be called via `using`
d) Generators for each rule. generators.register-c-compiler,
generators.register-linker, and generators.register-linker
should work. If you inherit from `unix`, then you get these
automatically. (Note: you should inherit from `unix` iff
library order on the command line must follow the usual
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