Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BJam not compiling boost libraries with '-mt' tag when multi threading specified

Tags:

boost

bjam

b2

I'm trying to compile boost v1.55 libraries for osx, with multi threading support. My user-config.jam configures the compiler as follows:

using clang : osx
: xcrun clang -arch i386 -arch x86_64 -stdlib=libstdc++ -mmacosx-version-min=10.9
;

And the command I run to build the libraries is as follows:

./b2 -a -j8 toolset=clang-osx link=static threading=multi --with-thread

However, the libraries generated are of the following format: libboost_.a, rather than libboost_-mt.a

Does anyone have any idea of why the '-mt' tag is omitted?

like image 716
MM. Avatar asked Dec 16 '13 18:12

MM.


1 Answers

In order to enable the formatting I requested (where tags are added to the library name to indicate the configuration the library was compiled in), the appropriate layout parameter needs to be set in the build options. My build command should have looked like this:

./b2 -a -j8 toolset=clang-osx link=static threading=multi --layout=tagged --with-thread
like image 86
MM. Avatar answered Sep 29 '22 07:09

MM.