Boost logo

Boost :

Subject: Re: [boost] [shared_ptr] Clang with Microsoft CodeGen in VS 2015 Update1
From: Beman Dawes (bdawes_at_[hidden])
Date: 2015-12-08 12:44:46


On Tue, Dec 8, 2015 at 10:55 AM, Peter Dimov <lists_at_[hidden]> wrote:

> Beman Dawes wrote:
>
> So it looks like the clang/c2 toolset doesn't support atomics yet. The
>> __c2__ and __c2_version__ macros allow detection of the clang/c2 toolset,
>> could a workaround be added to shared_ptr?
>>
>
> If you change
>
> #if defined( __clang__ ) && defined( __has_extension )
> # if __has_extension( __c_atomic__ )
> # define BOOST_SP_HAS_CLANG_C11_ATOMICS
> # endif
> #endif
>
> in sp_counted_base.hpp to
>
> #if defined( __clang__ ) && defined( __has_extension ) && !defined( __c2__
> )
> # if __has_extension( __c_atomic__ )
> # define BOOST_SP_HAS_CLANG_C11_ATOMICS
> # endif
> #endif
>
> does it work then?
>
>
I also had to do the same for two other cases, but in the end
sp_counted_base_w32.hpp worked and the entire filesystem dll built OK.
Furthermore, all the test programs are passing! The test programs were
compiled with the regular msvc compiler and then linked against the clang
compiled dll.

Turns out all that has to be done to call clang from the command line is to
add "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang
3.7\bin\x86" to the path, so it should be easy to see if Boost.Build will
work.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk