Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1065413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T19:47:55+00:00 2026-05-16T19:47:55+00:00

When building Boost binary libraries with bjam , one may specify which compiler to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T19:47:56+00:00Added an answer on May 16, 2026 at 7:47 pm

    There is a direct mapping from the toolset specified to the base part of the tag. Hence for any Apple Xcode compiler that you specify that uses the darwin.jam toolset the start of the tag will always be xgcc (for Xcode GCC). The second part, i.e the version number of the compiler, is usually automatically discovered from the compiler itself. The darwin.jam toolset code uses the -dumnpversion option to discover what that version is (see darwin.jam line #123). So a few things:

    1. For Xcode it will always be toolset=darwin for the default g++.
    2. For other non-default versions you have to set up a site-config.jam or user-config.jam to tell Boost Build where and which are the compilers you have (see the BB Configuration docs).
    3. The toolset=darwin-<some_version> matches what you specify in your configuration.
    4. The darwin.jam toolset supports smart selection of the compiler based on what you are trying to build to make it a bit easier.

    For example I use something like the following for iOS development:

    using darwin : : /Xcode-path/usr/bin/g++-4.0 ;
    using darwin : : /Xcode-path/usr/bin/g++-4.2 ;
    using darwin : 4.2~iphone
    :   /Xcode-path/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6
    :   <striper>
    :   <architecture>arm <target-os>iphone
    ;
    using darwin : 4.2~iphonesim
    :   /Xcode-path/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2
    :   <striper>
    :   <architecture>x86 <target-os>iphone
    ;
    

    For which I can:

    1. bjam toolset=darwin-4.0 — For a regular OSX build with GCC 4.0. Which results in the tag xgcc-42.
    2. bjam toolset=darwin-4.2 — Similarly for OSX and GCC 4.2. For which I would get a tag of xgcc-42.
    3. bjam toolset-darwin architecture=arm target-os=iphone — To do an iPhone device build with GCC 4.2. The tag ends up also being xgcc42 which is a collision. But there’s a limit to how much we can account for in those tags. And it’s usually not a problem because one segregates built results across platforms anyway.

    You might set up using one of the LLVM compilers by adding to your configuration:

    using darwin : 4.2~llvm~gcc : /Xcode-path/user/bin/llvm-g++ ;
    

    And invoke with bjam toolset=darwin-4.2~llvm~gcc. Unfortunately the tag would also be xgcc-4.2 (as again, it’s based on using darwin.jam). So you would need to segregate the resulting libs from the other GCC builds.

    Also unfortunate is that there isn’t a documented location of mapping the toolset used to the tag value other than in code (see the BB common.jam lines #801 to #841).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I specify 64-bit machine architecture when building boost libraries with bjam on
I'm building the boost libraries with bjam for both the intel compiler and vs2008,
Does anyone have a set of instructions for building boost libraries for use on
My system is having trouble building the boost libraries. I understand that most boost
First I built the Boost libraries that require building by going to /usr/local/boost_1_49_0/ and
I'm working on building the Boost platform for a currently unsupported toolchain. Obviously we'd
Unlike this question: Linker Error while building application using Boost Asio in Visual Studio
I am building an application in C++, Mac OS X, Qt and using boost
I want to have a static Universal binary lib of Boost. (Preferable the latest
building libraries with waf is nice and I like the lib<targetname> naming scheme. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.