Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building fat libraries on OSX
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2016-11-22 07:59:27

Le 22/11/2016 à 10:57, Raffi Enficiaud a écrit :
> Hi all,
> Building fat libraries (i386, x64) on OSX does not seem to work as
> expected with b2. I am using XCode 8 / Clang8.
> ../b2 toolset=clang address-model=32_64 architecture=x86 cxxflags="-arch
> x86_64 -arch i386 -std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++"
> --prefix=`pwd`/../${build_folder} --without-log --layout=versioned install
> - address-model=32_64 has no effect, I need to add "-arch x86_64 -arch
> i386"
> - static libraries are fine:
> $ lipo -info boost_1_62_0/lib/libboost_thread-clang-darwin42-mt-1_62.a
> Architectures in the fat file: lib/libboost_thread-
> clang-darwin42-mt-1_62.a are: x86_64 i386
> - shared libraries are not:
> $ lipo -info
> boost_1_62_0/lib/libboost_thread-clang-darwin42-mt-1_62.dylib
> Architectures in the fat file: lib/libboost_thread-
> clang-darwin42-mt-1_62.dylib are: x86_64
> Does anyone has experience with this? I have the feeling that setting
> "cxxflags" removes the effect of "address-model=32_64", can anyone confirm?
> how can I build boost with clang and C++11 mode?
> Thanks in advance,
> Raffi

BTW, this is working when I do not specify the toolset, as mentioned here:

so the toolset=clang is missing something.


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at