
On Tue, Dec 8, 2015 at 10:55 AM, Peter Dimov
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