When building Boost binary libraries with bjam
, one may specify which compiler to use, without specifying a particular compiler version, by using certain values for the --toolset=
option. For example:
bjam --with-serialization --toolset=msvc
the toolset value msvc
tells bjam
to search your system for some version of Microsoft Visual C++ and then use it to build a number of variants of the Boost.Serialization library. The resulting libraries will contain a tag indicating which toolset was actually used. For example, the above command creates files such as:
libboost_serialization-vc100-mt-s-1_44.lib
libboost_serialization-vc100-mt-sgd-1_44.lib
...
where the string vc100
in the filename is a toolset tag indicating that the Microsoft Visual C++ 2010 compiler version was found and used to build the libraries. [More details about Boost library file naming conventions can be found here.]
One may specify also a specific version of a compiler using certain other values for the --toolset=
option. For example:
bjam --with-serialization --toolset=msvc-9.0
tells bjam
that, even though I may have several compilers on my system, I want it to specifically use Microsoft Visual C++ 2008. The resulting libraries contain the tag string vc90
to indicate that Microsoft Visual C++ 2008 was used to build them.
The Boost documentation seems to be a bit out-of-date with respect to newer compilers on the Mac (e.g., how does one distinguish between GCC, LLVM-GCC and LLVM?)
My question is, what are some of the other bjam --toolset=
values and their corresponding tags for specific compiler versions in Xcode 3 and Xcode 4 on the Mac (not the general compiler name values like darwin
)? Are these documented anywhere? Even if building Boost libraries with some versions is not yet supported by Boost, have the toolset
and tag values been specified yet?
Please help replace the ???
s in this table:
TOOL AND VERSION --toolset= TAG
======================================================
Microsoft Visual C++ 2008 msvc-9.0 vc90
Microsoft Visual C++ 2010 msvc-10.0 vc100
Apple (1) GCC 4.0 (2) ??? xgcc40
Apple GCC 4.2 ??? xgcc42
Apple LLVM GCC 4.2 ??? ???
Apple LLVM compiler 1.5 (2) ??? ???
Apple LLVM compiler 2.0 (3) ??? ???
(1) Apple produces their own versions of the GCC and LLVM compilers to add Apple-specific extensions and behavior.
(2) Available in Xcode 3 only.
(3) Available in Xcode 4 only.
.jam
files to use--toolset=darwin-4.0
or--toolset=darwin-4.2
. I've updated the table in the question to include these and their associated tags. – Stubborn